Confused.

Syver Enstad syver.enstad at sensewave.com
Sat Nov 11 12:23:52 EST 2000


"Alex Martelli" <aleaxit at yahoo.com> wrote in message
news:8ujqao029t5 at news1.newsguy.com...
> gbreed's alternative suggestion was:
>
> > > import pywintypes, time
> > > comtime = pywintypes.Time(time.time())

What you're trying to say is that the constructor of Time, converts from
time.time() format to a PyTime object, and you use float on the PyTime to
get the variant_date or whatever the COM date type is called. Right?.

But there is still no function to convert from comtime to ctime format is
there?

An interesting bug by the way:
>>> import pywintypes, time
>>> ctime = time.time()
>>> comtime = pywintypes.Time(ctime)

I'll think I'll stick to the time module or I'll have to go to work tomorrow
;-)
>>> time.ctime(ctime)
'Sat Nov 11 17:59:33 2000'
>>> comtime.Format('%#c')
'Sunday, November 11, 2000 17:59:33'






More information about the Python-list mailing list