[Pythonmac-SIG] (no subject)

Steven Burr sburr@home.com
Wed, 21 Feb 2001 10:52:23 -0700


> > I've just noticed that on Mac OS X PB, time.time() as well as some=20=

> > related time functions (os.path.getmtime()) return *negative* =
values.=20
> > The doc says that time.time() expected behavior is to=20
> > =20
> > "=20
> > Return the time as a floating point number expressed in seconds =
since=20
> > the epoch, in UTC. Note that even though the time is always returned =
as=20
> > a floating point number, not all systems provide time with a better=20=

> > precision than 1 second.=20
> > "=20
> =20
> Oww, blech. And I just checked in a mod to the Python repository to =
work =20
> around this.=20
> =20
> I'll have a look to see what caused the time to go negative. I think =
it may be =20
> the new carbonized GUSI library we use.=20

And yet:

>>> import time=0D>>> time.time()=0D-1229371370.154659=0D>>> =
time.ctime(time.time())=0D'Wed Feb 21 10:25:34 2001'

time.localtime() returns the correct time tuple.  Somehow the the other =
time functions are able to use the negative value from time.time() to =
produce the correct local calendar and clock values. =20

I checked time.time() on the command line version of Python for Darwin, =
and it returns a reasonable looking positive value.

BTW, I  downloaded 2.1a2 this morning and am using it on a Beige =
G3/300/192.   It's working fine, except just now when I clicked the red =
gumdrop to close a script window in IDE, the application "quit =
unexpectedly."  Just the kind of thing one expects from an alpha.

This is a great start for Python on Mac OSX.  Thanks, Jack!