[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Python mx.DateTime



On Fri, Dec 28, 2001 at 01:05:23PM -0500, Wayne Topa wrote:
>   I have found an annoying 'feature' of the new mx.DateTime module and
> wonder if this is from something I am doing incorrectly.  Any comments
> appreciated.

It's printing that because __debug__ is true.

rick@tc:~/Mail$ python
Python 2.1.1 (#1, Nov 11 2001, 18:19:24)
[GCC 2.95.4 20011006 (Debian prerelease)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> print __debug__
1
>>>

Why *that's* so, I don't know.

(Side note: I needed to import from mx.DateTime -- note the period.)

> root-Deb-Woody:~# python
> Python 2.1.1 (#1, Nov 11 2001, 18:19:24)
> [GCC 2.95.4 20011006 (Debian prerelease)] on linux2
> Type "copyright", "credits" or "license" for more information.
> >>> from mxDateTime import *
> >>> a = 'Thu Dec 20 07:10:30 EST 2001  PPP-UP'
> >>> b = 'Thu Dec 20 07:12:21 EST 2001  PPP-OFF'
> >>> on = DateTimeFrom(a)
> parsed time: '07:10:30 EST' giving: 7 10 30.0 -05:00:00.00
> ('Thu', 'Dec', '20', '2001', None)
> parsed date: 'Thu Dec 20  2001' giving: 2001 12 20
> >>> off = on = DateTimeFrom(b)
> parsed time: '07:12:21 EST' giving: 7 12 21.0 -05:00:00.00
> ('Thu', 'Dec', '20', '2001', None)
> parsed date: 'Thu Dec 20  2001' giving: 2001 12 20
> 
> 
> In the Old DateTime module, which just got replaced, those parsed time 
> and date lines were not there.  Is is a new feature of mx.DateTime
> that we have to live with?  I have been unable to find any reference
> to this in the Python Docs.  
> 
> As this is messing up a few of my old python 1.5 programs I would
> appreciate any pointers to a fix.  I get the same results in python
> 2.1 and 2.2 so it seems that it is just that module.
> 
> TIA
> 
> Wayne
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 

-- 
We recognize the right of every man to perform services for
himself or to serve others according to conditions arrived at
through free bargaining. Communism denies this right, since it
places all services in the hands of an arbitrary, central
authority.
	-- Frédéric Bastiat (1801-1850)
    Rick Pasotto    rickp@telocity.com    http://www.niof.net



Reply to: