I'm trying to understand what pyinstaller is doing.
I have a script that has something like:
if sys.platform.startswith('win'):
import w32util
The module w32util in turn imports win32api.
Every once in a while I get an exception like:
Traceback (most recent call last):
File "<string>", line 34, in <module>
File "e:\src_home\installer\pyinstaller\iu.py", line 312, in importHook
File "e:\src_home\installer\pyinstaller\iu.py", line 398, in doimport
File "e:\src_home\installer\buildinstaller\out1.pyz/win32com", line 5, in
<module>
File "e:\src_home\installer\pyinstaller\iu.py", line 334, in importHook
ImportError: No module named win32api
So I changed the above to:
if sys.platform.startswith('winfoobar'):
import win32api
That is, my code should never actually try to import win32api. And I changed
iu.importHook to immediately raise if win32api is imported. And it still gets
imported! If I comment out the lines, then it does not.
Now I understand that during Analysis pyinstaller decides what to bundle. But
does it automatically import everything that gets bundled, automatically,
before
ever trying to run my script?
marvin
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---