Hi Chris,
that seems to be exactly what i need.
Cheers
Kim
>>> import resource
>>> def cpu_time():
... return resource.getrusage(resource.RUSAGE_SELF)[0]
...
Now try this out
>>> def f():
... for i in xrange(10):
... pass
...
>>> start = cpu_time(); f(); dt = cpu_time() - start; pri
nning.
kim
On Feb 6, 2007, at 8:20 PM, Christopher Lucas wrote:
>
> On Feb 6, 2007, at 9:14 PM, Kim Branson wrote:
>
>> Hi
>>
>> whats the simplest cross platform way of getting the cpu time used by
>> a python script?
>>
&g
Hi
whats the simplest cross platform way of getting the cpu time used by
a python script?
Kim
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
ethod
to the class after it is initialized. Or adding decorators to the
method after it is defined?
kim
On Jan 22, 2007, at 5:14 PM, Kent Johnson wrote:
> Kim Branson wrote:
>> Hi i'm interested in implementing a factoryclass in python
>> What i'd like to do is hav
Hi i'm interested in implementing a factoryclass in python
What i'd like to do is have my factoryClass produce an instance of a
class with some methods defined in arguments to the factory class.
The classes that are produced have many common methods, but a single
unique method. This method ac
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi all,
i'm interested in building a gui for some code we have. I'm after
pointers on gui programming, and a recommendation on a cross platform
gui library, wxpython? pythoncard, qt? What do people use. Ideally i'd
like something that can work on win
uld be negative!!
Batteries included once again!
Alan G.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Kim Branson
Diffraction and Theory
CSIRO Health Sciences and Nutrition
343 Royal Parade, Parkville
Melbourne
Ph +613 9
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi all,
heres a quick one for you,
I have a series of data that I am using dictionaries to build
histograms for. I'd like to round the data to the nearest 10, i.e if
the value is 15.34 should we round down to 10? and conversely rounding
say 19.30 to
interface now where you can
build your own tools. (if you like to use widgets, or you can just
write you own code calling it). Its all GPL and its pretty fantastic
stuff.
http://magix.fri.uni-lj.si/orange/
good luck
kim
Dr Kim Branson
Diffraction and Theory
CSIRO Health Sciences and Nutrition
343