My python interpreter became mad !
Benjamin Watine
watine at cines.fr
Tue Mar 25 07:05:57 EDT 2008
Yes, my python interpreter seems to became mad ; or may be it's me ! :)
I'm trying to use re module to match text with regular expression. In a
first time, all works right. But since yesterday, I have a very strange
behaviour :
$ python2.4
Python 2.4.4 (#2, Apr 5 2007, 20:11:18)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
X-Spam-Flag: YES
X-Spam-Checker-Version: SpamAssassin 3.1.7-deb (2006-10-05) on w3hosting.org
X-Spam-Level: **********************
X-Spam-Status: Yes, score=22.2 required=5.0 tests=MISSING_HB_SEP,
MISSING_HEADERS,MISSING_SUBJECT,RAZOR2_CF_RANGE_51_100,
RAZOR2_CF_RANGE_E8_51_100,RAZOR2_CHECK,TO_CC_NONE,UNPARSEABLE_RELAY,
URIBL_AB_SURBL,URIBL_JP_SURBL,URIBL_OB_SURBL,URIBL_SBL,URIBL_SC_SURBL,
URIBL_WS_SURBL autolearn=failed version=3.1.7-deb
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/etc/postfix/re.py", line 19, in ?
m = re.match('(Spam)', mail)
AttributeError: 'module' object has no attribute 'match'
>>>
What's the hell ?? I'm just importing the re module. The code showed, is
a previous test code, that seems to be buffered and that make an error.
Each call to re module generate that error.
How can I workaround ? Is there is a way to flush or restart python
interpreter. Is it a bug in python ??
Thanks !
Ben
More information about the Python-list
mailing list