Re: How to get milliseconds when substructing datetime objects?

2007-12-13 Thread Dmitri O.Kondratiev
:40:24 -0300, Dmitri O.Kondratiev dokondr at gmail.com http://mail.python.org/mailman/listinfo/python-list escribió: * Please help to find simple solutiion for measuring times of operations ** with ** millisecond precision. ** For this I am trying to use datetime() objects: ** ** import time

Re: How to get milliseconds when substructing datetime objects?

2007-12-13 Thread Dmitri O.Kondratiev
then these ones) please let me know! -- Dmitri O. Kondratiev [EMAIL PROTECTED] http://www.geocities.com/dkondr *Dmitri O.Kondratiev* dokondr at gmail.compython-list%40python.org?Subject=How%20to%20get%20milliseconds%20when%20substructing%20datetime%20objects%3FIn-Reply-To=wrote: *Thu Dec 13 16:19:35 CET

How to get milliseconds when substructing datetime objects?

2007-12-12 Thread Dmitri O.Kondratiev
Please help to find simple solutiion for measuring times of operations with millisecond precision. For this I am trying to use datetime() objects: import time import datetime def dreamTime(secs): t1 = datetime.datetime.now() time.sleep(secs) t2 = datetime.datetime.now() dt = t2 -

Millisecond timestamp function?

2007-10-19 Thread Dmitri O.Kondratiev
What Python module / function can be used to get millisecond timestamps? time.time() returns the time as a floating point number expressed in seconds since the epoch, in UTC. Thanks! -- Dmitri O. Kondratiev [EMAIL PROTECTED] http://www.geocities.com/dkondr --

Re: Newbi Q: What is a rational for strings not being lists in Python?

2007-10-16 Thread Dmitri O.Kondratiev
On 10/16/07, Matt McCredie [EMAIL PROTECTED] wrote: [quote] The example you posted won't work with tuples either because they, like strings, are also immutable. So, the best way to get the posted code to work (which is a bad way to go about reversing a string, but I digress) [end-quote] I

Using Python to access CORBA server?

2007-10-16 Thread Dmitri O.Kondratiev
Need advice: What library can Python client use to access CORBA server using DII (Dynamic Invocation Interface) ? Thanks, Dima -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbi Q: Recursively reverse lists but NOT strings?

2007-10-15 Thread Dmitri O.Kondratiev
] http://www.geocities.com/dkondr On 10/15/07, Gary Herron [EMAIL PROTECTED] wrote: Dmitri O.Kondratiev wrote: The function I wrote (below) reverses lists all right: def reverse(xs): if xs == []: return [] else: return (reverse (xs[1:])) + [xs[0

Newbi Q: What is a rational for strings not being lists in Python?

2007-10-15 Thread Dmitri O.Kondratiev
? Thanks, -- Dmitri O. Kondratiev [EMAIL PROTECTED] http://www.geocities.com/dkondr On 10/15/07, Dmitri O.Kondratiev [EMAIL PROTECTED] wrote: Gary, thanks for lots of info! Python strings are not lists! I got it now. That's a pity, I need two different functions: one to reverse a list and one

Newbi Q: Recursively reverse lists but NOT strings?

2007-10-14 Thread Dmitri O.Kondratiev
The function I wrote (below) reverses lists all right: def reverse(xs): if xs == []: return [] else: return (reverse (xs[1:])) + [xs[0]] reverse ([1,2,3]) [3, 2, 1] Yet when I try to reverse a string I get: reverse (abc) ... ... ... File