new.py and having '.' in PYTHONPATH

Tobiah toby at tobiah.org
Mon Feb 23 16:00:51 EST 2015


Was working along, and wasted some time on this.

Wanted to try something on my script, so I copied
it to 'new.py'.  It wouldn't run, and neither would
the one I copied from!

Traceback (most recent call last):
   File "a2z.py", line 6, in <module>
     from suds.client import Client
   File "build/bdist.linux-i686/egg/suds/__init__.py", line 154, in <module>
     
   File "build/bdist.linux-i686/egg/suds/client.py", line 30, in <module>
   File "build/bdist.linux-i686/egg/suds/sudsobject.py", line 25, in <module>
ImportError: cannot import name classobj


I finally figured out that the presence of new.py in
my directory was breaking things.  '.' is in my
PYTHONPATH, so maybe suds was looking for some
other new.py.

Anyway, it raises the question as to whether having '.' in the
PYTHONPATH is at all a sane thing to do.

Thanks,

Tobiah




More information about the Python-list mailing list