Python 1.5.2 -- assigning current time to a variable?
scott.nadeau at sanmina.com
scott.nadeau at sanmina.com
Wed Oct 31 11:24:50 EST 2001
Hi everybody,
I am new to Python and I am stuck. I need to determine what the
current time is and do one thing or another based on what time it is.
I have seen people talk about how to get the current time using
Python 2.1, but I'm working with 1.5.2.
Using:
timestring = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
Yields:
TypeError: function requires at least one argument
How do I pass the argument?
Sorry if this is a stupid question...
Thanks,
Scott
More information about the Python-list
mailing list