<div>Most probably X-Spam added itself to your path.</div>
<div>you should look at your PATH and PYTHONPATH environment variables.<br><br></div>
<div class="gmail_quote">On Tue, Mar 25, 2008 at 1:40 PM, John Machin <<a href="mailto:sjmachin@lexicon.net">sjmachin@lexicon.net</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="Ih2E3d">On Mar 25, 10:05 pm, Benjamin Watine <<a href="mailto:wat...@cines.fr">wat...@cines.fr</a>> wrote:<br>> Yes, my python interpreter seems to became mad ; or may be it's me ! :)<br>><br>
</div>
<div class="Ih2E3d">> I'm trying to use re module to match text with regular expression. In a<br>> first time, all works right. But since yesterday, I have a very strange<br>> behaviour :<br>><br></div>
<div class="Ih2E3d">> $ python2.4<br>> Python 2.4.4 (#2, Apr  5 2007, 20:11:18)<br>> [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2<br>> Type "help", "copyright", "credits" or "license" for more information.<br>
>  >>> import re<br>> X-Spam-Flag: YES<br>> X-Spam-Checker-Version: SpamAssassin 3.1.7-deb (2006-10-05) on <a href="http://w3hosting.org/" target="_blank">w3hosting.org</a><br>> X-Spam-Level: **********************<br>
> X-Spam-Status: Yes, score=22.2 required=5.0 tests=MISSING_HB_SEP,<br>>          MISSING_HEADERS,MISSING_SUBJECT,RAZOR2_CF_RANGE_51_100,<br>><br>> RAZOR2_CF_RANGE_E8_51_100,RAZOR2_CHECK,TO_CC_NONE,UNPARSEABLE_RELAY,<br>
><br>> URIBL_AB_SURBL,URIBL_JP_SURBL,URIBL_OB_SURBL,URIBL_SBL,URIBL_SC_SURBL,<br>>          URIBL_WS_SURBL autolearn=failed version=3.1.7-deb<br>><br>> Traceback (most recent call last):<br>>    File "<stdin>", line 1, in ?<br>
</div>
<div class="Ih2E3d">>    File "/etc/postfix/re.py", line 19, in ?<br></div>
<div class="Ih2E3d">>      m = re.match('(Spam)', mail)<br>> AttributeError: 'module' object has no attribute 'match'<br>>  >>><br>><br></div>
<div class="Ih2E3d">> What's the hell ?? I'm just importing the re module.<br><br></div>No you're not importing *the* re module. You're importing *an* re<br>module, the first one that is found. In this case: your own re.py.<br>
Rename it.<br>
<div>
<div></div>
<div class="Wj3C7c"><br>--<br><a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br></div></div></blockquote></div><br><br clear="all"><br>
-- <br>Furkan Kuru