Python question
Thomas Charron
twaffle at gmail.com
Wed Jan 7 12:12:58 EST 2009
On Wed, Jan 7, 2009 at 12:03 PM, Paul Lussier <p.lussier at comcast.net> wrote:
> "Thomas Charron" <twaffle at gmail.com> writes:
>> On Tue, Jan 6, 2009 at 4:26 PM, Paul Lussier <p.lussier at comcast.net> wrote:
>>> Hi Folks,
>>> Is there a python way to get HH:MM:SS from time.localtime() ?
>> time.strptime?
> 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.
--
-- Thomas
More information about the gnhlug-discuss
mailing list