On Fri, 2010-02-05 at 17:38 +0100, Marcin Krol wrote: > Linux RH [17:35] root /var/www/html # ./cssh > Traceback (most recent call last): > File "<string>", line 19, 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 "/var/www/html/warnings.py", line 3, in ? > from hosts_sqla import Host, Architecture, OS_Kind, OS_version, > Email, Virtualization, session > 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 "./hosts_sqla.py", line 3, in ? > from sqlalchemy import create_engine, Table, Column, String, > Integer, MetaData, ForeignKey, desc, asc, and_, or_ > File "/var/www/html/pyinstaller-py2.4/iu.py", line 458, in importHook > raise ImportError, "No module named %s" % fqname > ImportError: No module named sqlalchemy > > > Huh? Why does my packed binary (cssh) try to import warnings.py that > happens to be in the same directory?
PyInstaller doesn't prevent importing files outside the package. This makes it easy to handle third-party plugins and the link. Of course, I agree that it's a bad default and should be changed. If you think it's worth it, remove the current directory from sys.path at startup. -- Giovanni Bajo Develer S.r.l. http://www.develer.com -- 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.
