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

Re: Python mx.DateTime



Rick Pasotto(rick@niof.net) is reported to have said:
> 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.)
> 

Turns out that there are some problems with python2.2 modules as well as 
__debug__ being turned on in mx.DateTime.

The old program now runs on 1.5 and 2.1 but python2.2 comes up with a
bunch of module errors.

Traceback (most recent call last):
  File "/usr/local/bin/net_time.py", line 19, in ?
    on = DateTimeFrom(lines[0])
  File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 218, in DateTimeFrom
    import Parser
  File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 18, in ?
    import DateTime,ISO,ARPA,Timezone
  File "/usr/lib/python2.2/site-packages/mx/DateTime/ISO.py", line 14, in ?
    import DateTime,Timezone
  File "/usr/lib/python2.2/site-packages/mx/DateTime/Timezone.py", line 49, in ?
    tzRE= re.compile(tz)
  File "/usr/lib/python2.2/sre.py", line 178, in compile
    return _compile(pattern, flags)
  File "/usr/lib/python2.2/sre.py", line 228, in _compile
    raise error, v # invalid expression
sre_constants.error: redefinition of group name 'sign' as group 7; was group 3

Looks like 2.2 might be a 'work in progress'.
Parser, ISO needs to import mx.DateTime not the old DateTime module.

I'm copying the maintainer just in case he hasn't seen the above.

Thanks again Rick!!

Wayne
-- 
According to my calculations the problem doesn't exist.
_______________________________________________________



Reply to: