updated version of David Ascher's compile.py?

gangli at msn.com gangli at msn.com
Mon Aug 28 13:18:25 EDT 2000


In article <hpYp5.18864$Xg.122696 at news-server.bigpond.net.au>,
  "Mark Hammond" <MarkH at ActiveState.com> wrote:
> > According to MS doc, this bug may be fixed by changing the code in
> > Pytime.cpp,starting at line 612:
> >
> > PYWINTYPES_EXPORT PyObject *PyWinObject_FromFILETIME(const FILETIME
> &t)
> > {
> > SYSTEMTIME st, lt;
> > if (!FileTimeToLocalFileTime(&t, &lt) ||
> >               !FileTimeToSystemTime(&lt, &st))
> > //if (!FileTimeToSystemTime(&t, &st))
> > return PyInt_FromLong(-1);
> > return PyFloat_FromDouble(PyCE_SystemTimeToCTime(&st));
> > }
>
> This function is only used on Windows CE, and not on the desktop.  The
> giveaway is the function SystemTimeToCTime.
>
> I'm not sure how you could see this bug, except on CE.
>
> If you still believe there is a bug, send me spme short code with the
> actual output and the expected output.
>
> Thanks,
>
> Mark.
>
>


here is ( running Python command line on NT 4.0):


Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import os, time, win32api
>>> fname = 'D:/python/pythonwin/pythonwin.txt'
>>> fobj = win32api.FindFiles(fname)[0]
>>> w_last_f_time = fobj[3]
>>> w_last_f_time.Format()
'05/03/99 22:23:16'
>>> last_time = os.path.getmtime(fname)
>>> time.localtime(last_time)
(1999, 5, 3, 17, 23, 16, 0, 123, 1)
>>> time.localtime(int(w_last_f_time))
(1999, 5, 3, 22, 23, 16, 0, 123, 1)
>>> time.localtime(int(w_last_f_time)-time.altzone)
(1999, 5, 3, 17, 23, 16, 0, 123, 1)
>>>


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list