I have an application that is created something like this,

a = Analysis( ['support/useUnicode.py', 'installer.py', 'gtkinit.py'] )
pyz = PYZ(a.pure)
exe = EXE(pyz, a.scripts, a.binaries, name='installer', debug=False,
           strip=False, upx=False, console=1)

installer.py has some logic like this somewhere in it,

if wantGUI:
    gtkinit = __import__('gtkinit')
    gtkinit.doSomeInitialization()


That is, under some circumstances gtkinit is not imported at all.  My 
applications works just fine under the conditions where the import is supposed 
to happen.  But when the import is not supposed to happen, my whole application 
runs fine and seems to be exiting (some messages I added at the "end" of the 
script print) and then I get an error caused by SOMETHING importing gtkinit. 
The exception itself is not interesting -- it is because the gtkinit module 
cannot be imported under certain conditions.

EXITING installer.py
Traceback (most recent call last):
   File "<string>", line 15, in ?
   File "/home/mgreenberg/src_home/installer/pyinstaller/iu.py", line 312, in 
importHook
     mod = _self_doimport(nm, ctx, fqname)
   File "/home/mgreenberg/src_home/installer/pyinstaller/iu.py", line 398, in 
doimport
     exec co in mod.__dict__
   File "/home/mgreenberg/src_home/installer/buildinstaller/out1.pyz/gtk", line 
37, in ?
   File "/home/mgreenberg/src_home/installer/pyinstaller/iu.py", line 312, in 
importHook
     mod = _self_doimport(nm, ctx, fqname)
...

-----------------------

But none of MY code is causing the import.  Presumably I can fix this with a 
sys.exit(), but is there some way to prevent this from happening?

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to