Python 1.5.2 -- assigning current time to a variable?

scott.nadeau at scott.nadeau at
Wed Oct 31 17:24:50 CET 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.  

timestring = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())

TypeError: function requires at least one argument

How do I pass the argument?

Sorry if this is a stupid question...

More information about the Python-list mailing list