Python question

Thomas Charron twaffle at gmail.com
Wed Jan 7 12:15:47 EST 2009


On Wed, Jan 7, 2009 at 12:12 PM, Thomas Charron <twaffle at gmail.com> wrote:
> On Wed, Jan 7, 2009 at 12:03 PM, Paul Lussier <p.lussier at comcast.net> wrote:
>> One would have thought...
>>  >>> time.strptime(time.localtime())
>>  Traceback (most recent call last):
>>    File "<stdin>", line 1, in <module>
>>    File "/opt/local/lib/python2.5/_strptime.py", line 327, in strptime
>>      found = format_regex.match(data_string)
>>  TypeError: expected string or buffer
>  Wait, I see.  strftime not strptime.  Sorry about that.  strptime is
> looking for a string in human readable form.

  Example:

>>> strftime("HH:MM:SS ", localtime())
'14:17:15'


-- 
-- Thomas


More information about the gnhlug-discuss mailing list