At Thursday 31/8/2006 18:38, ddtl wrote:

My script uses re.compile() function, and while it rans without errors
under Linux, when I ran that script under Windows I get the following
error:

Traceback (most recent call last):
  File "C:\a\projects\re.py", line 4, in ?
    import re
  File "C:\a\projects\re.py", line 95, in ?
    main()
  File "C:\a\projects\re.py", line 37, in main
    s_exp = re.compile(op['-s'])
AttributeError: 'module' object has no attribute 'compile'

What is the problem here? re module is installed and is on the path -
for example, the following code works and doesn't cause any errors:

import re
re.compile('a')

What else could cause such an error?

Your *own* module is called re.py, right?
Try another name...



Gabriel Genellina
Softlab SRL

        
        
                
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya! http://www.yahoo.com.ar/respuestas

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to