anonymous assignment
Michele Simionato
michele.simionato at gmail.com
Mon May 12 05:45:40 EDT 2008
On May 12, 4:28 am, Yves Dorfsman <y... at zioup.com> wrote:
>there's got to be a better way than:
>
> d = time.local()
> y = d[0]
> d = d[1]
Uses Python 2.6! ;)
Python 2.6a3 (r26a3:62861, May 12 2008, 11:41:56)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.localtime()
time.struct_time(tm_year=2008, tm_mon=5, tm_mday=12, tm_hour=11,
tm_min=43, tm_sec=47, tm_wday=0, tm_yday=133, tm_isdst=1)
>>> t=time.localtime()
>>> t.tm_year, t.tm_mday
(2008, 12)
More information about the Python-list
mailing list