Works only in interactive mode

Sam Pointon free.condiments at gmail.com
Mon Oct 10 19:04:15 EDT 2005


That looks like a different module named pcop getting in the way. If
there's another pcop.py in the directory where you're running it as a
script, then that gets priority and you'll end up with an error like
the one you got. However, if you run it interactively, then that
directory is not checked, or is (normally) checked lower-down than,
say, Python's standard library. Try checking if help(pcop) and
dir(pcop) are what you expect in the script, and looking at where
sys.path is looking for scripts.




More information about the Python-list mailing list