I suppose we can do something like that (kind of pseudo code) to fully
configure it:
def doSomeStuff(*args):
...
def progressBar( func, *args)
import time, sys
f = sys.stdout
for i in range(20):
func.__call__(args)
f.write('=')
f.fl
Hello Steven,
I added the pipe char '|' to have a complete spinner!
This would be set as a function for my wait routine installer.
Thanks to share!
Karim
On 12/10/2010 09:51 PM, Steven D'Aprano wrote:
Modulok wrote:
List,
Forgive me if I don't describe this well, I'm new to it:
[snip des
Hello Steven,
Could take some time when possible to answer to my follow-up question?
Thank you!
Cheers
Karim
On 12/14/2010 12:19 AM, Karim wrote:
On 12/13/2010 11:47 PM, Steven D'Aprano wrote:
Karim wrote:
Hello all,
I am seeking for information about the template pattern applied to
pyth
Modulok wrote:
List,
When you create unit tests, do you group tests for a given function
together into one unit test method, or do you prefer to have separate
test methods for every assert statement?
Each test method should test one thing. That doesn't necessarily mean
one assert, but one con
"Gregory, Matthew" wrote
class PositiveX(object):
def __init__(self):
@property
def x(self):
@x.setter
def x(self, val):
I don't use properties in Python very often (hardly ever in fact)
and I've never used @setter so there may be naming requirements
I'm not aware of. But i
List,
When you create unit tests, do you group tests for a given function
together into one unit test method, or do you prefer to have separate
test methods for every assert statement?
Thanks!
-Modulok-
___
Tutor maillist - Tutor@python.org
To unsubsc
jtl999 wrote:
I want to pass a variable to os.system which is dir
dir=raw_input ("Dir Please ")
Dir Please /
ok dir = /
os.system ("ls" + dir)
sh: ls/: No such file or directory
32512
any advice
Yes -- learn to read the error messages you get. The error you get is a
shell error, not a P
On Fri, Dec 17, 2010 at 4:17 PM, Emile van Sebille wrote:
> On 12/17/2010 4:07 PM jtl999 said...
>>
>> I want to pass a variable to os.system which is dir
> dir=raw_input ("Dir Please ")
> os.system ("ls" + dir)
>> sh: ls/: No such file or directory
>
> this has concatenated "ls" and dir
Hi all,
Consider the following classes where PositiveX should constrain the attribute
_x to be positive and SmallX should further constrain the attribute _x to be
less than 10.
class PositiveX(object):
def __init__(self):
self._x = 1
@property
def x(self):
return sel
On 12/17/2010 4:07 PM jtl999 said...
I want to pass a variable to os.system which is dir
dir=raw_input ("Dir Please ")
Dir Please /
ok dir = /
os.system ("ls" + dir)
sh: ls/: No such file or directory
this has concatenated "ls" and dir
try with "ls "
Emile
32512
any advice
__
I want to pass a variable to os.system which is dir
>>> dir=raw_input ("Dir Please ")
Dir Please /
ok dir = /
>>> os.system ("ls" + dir)
sh: ls/: No such file or directory
32512
any advice
signature.asc
Description: This is a digitally signed message part
_
Thanks for all the good advice guys!
Joel
> -Original Message-
> From: tutor-bounces+joel=joelschwartz@python.org
> [mailto:tutor-bounces+joel=joelschwartz@python.org] On
> Behalf Of Alan Gauld
> Sent: Thursday, December 16, 2010 4:27 PM
> To: tutor@python.org
> Subject: Re: [Tu
zicu radu wrote:
Hello,
How to prevent shadows a built-in in code.
Please if you are kind enougth to take the time to provide feedback I would
appreciate that it is constructive.
The script is here: http://bpaste.net/show/12364/
Are you sure you have posted the right link? This is a functi
Hello,
How to prevent shadows a built-in in code.
Please if you are kind enougth to take the time to provide feedback I would
appreciate that it is constructive.
The script is here: http://bpaste.net/show/12364/
___
Tutor maillist - Tutor@python.org
Sean Carolan wrote:
>> I have a database with a table called "systems" that contains an
>> auto-increment id field, as well as fields for each of the keys in
>> mydata.keys(). But I can't seem to get the syntax to import
>> mydata.values() into the table. I think the problem may be that some
>>
15 matches
Mail list logo