Hello Giovanni,
Try to print sys.path for debugging. It might well be possible that the
entry you want to remove is ".".
I thought perhaps I mucked smth on my system, so I tried it on another
system (RH 5.3, python is stock 2.4.3) and I get the same thing:
sys.path []
Traceback (most recent call last):
File "<string>", line 30, in ?
File "/var/www/html/pyinstaller-py2.4/iu.py", line 439, in importHook
mod = _self_doimport(nm, ctx, fqname)
File "/var/www/html/pyinstaller-py2.4/iu.py", line 524, in doimport
exec co in mod.__dict__
File "./socket.py", line 2, in ?
raise AssertionError, "this is bad"
AssertionError: this is bad
I'm doing this in code:
import sys
sys.path = [ p for p in sys.path if p.startswith('/usr/lib') ]
print "sys.path", sys.path
...
import socket
I have created file "socket.py" in current directory with this content:
raise AssertionError, "this is bad"
As you can see, sys.path is empty, and yet importHook imports socket.py
from current directory.
Regards,
mk
--
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pyinstaller?hl=en.