| Store | Cart

mysteriously nonfunctioning script - very simple

From: Heiko Wundram <mode...@ceosg.de>
Sat, 26 Mar 2005 21:52:50 +0100
Am Samstag, 26. M?rz 2005 19:47 schrieb Sean McIlroy:
> <snip>

Why not try the following:

>>> import datetime>>> x = datetime.datetime.now()>>> x
datetime.datetime(2005, 3, 26, 21, 48, 13, 495765)
>>> y = datetime.datetime(2005,3,26,21,50) # Wake me up today at 21:50>>> y
datetime.datetime(2005, 3, 26, 21, 50, 13)
>>> time.sleep((y-x).days*60*60*24+(y-x).seconds+(y-x).microseconds*0.000001)>>> print "I am past the timeout!"

-- 
--- Heiko.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20050326/f70fdc5f/attachment.pgp>

Recent Messages in this Thread
Sean McIlroy Mar 26, 2005 06:13 am
Piet van Oostrum Mar 26, 2005 11:12 am
Peter Hansen Mar 26, 2005 11:55 am
Sean McIlroy Mar 26, 2005 06:47 pm
Diez B. Roggisch Mar 26, 2005 07:01 pm
Peter Otten Mar 26, 2005 07:19 pm
Michael Spencer Mar 26, 2005 07:41 pm
Heiko Wundram Mar 26, 2005 08:52 pm
Sean McIlroy Mar 27, 2005 07:41 pm
Greg Ewing Mar 31, 2005 04:04 am
Messages in this thread

Previous post: Embedding Python
Next post: Embedding Python