<HTML>
<HEAD>
<TITLE>Error</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>I’m relative new to python and I puzzled by the following strange (to me) behavior. I was taking pieces from two old scripts to build a new one. When I began to debug it I got the following error message:<BR>
<BR>
Traceback (most recent call last):<BR>
File "/Users/williamminer/ex2gen/ex2gen-3.0.5/src/ScriptDev/run_ex2gen_scan.py", line 38, in <module><BR>
if re.search('varm',line):<BR>
AttributeError: 'function' object has no attribute 'search'<BR>
<BR>
This had worked in the previous script but not the new one. I noticed that the new script had an additional line at the beginning (line 3)<BR>
<BR>
#!/usr/bin/env python<BR>
import sys, math, os, shutil, commands, re, mpmath<BR>
from mpmath import *<BR>
<BR>
When I deleted this line, the script ran. Why did the line<BR>
<BR>
from mpmath import *<BR>
<BR>
Trash the search function fro the regular expression module?<BR>
<BR>
I’m running Python 2.6.2 on Mac running OS 10.6.3.<BR>
<BR>
Thanks!<BR>
<BR>
Buff Miner<BR>
</SPAN></FONT><SPAN STYLE='font-size:11pt'><FONT FACE="Lucida Calligraphy">-- <BR>
</FONT></SPAN><FONT FACE="Lucida Calligraphy"><FONT SIZE="1"><SPAN STYLE='font-size:9pt'>Enig Associates, Inc.<BR>
Suite 500, Bethesda Crescent Bldg.<BR>
4600 East West Hwy<BR>
Bethesda, Maryland 20814<BR>
Tel:(301)680-8600<BR>
Fax:(301)680-8100<BR>
<BR>
This message is intended only for the use of the intended recipient(s), and<BR>
it may be privileged and confidential. If you are not the intended<BR>
recipient, you are hereby notified that any review, retransmission,<BR>
conversion to hard copy, copying, circulation or other use of this message<BR>
is strictly prohibited and may be illegal. If you are not the intended<BR>
recipient, please notify the sender immediately by return e-mail, and delete<BR>
this message from your system. Thank you.<BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT>
</BODY>
</HTML>