I rewrote the previous program to clear it up a bit and make the
testcase clearer:
test.py: =======================================
import subprocess
import os
import wx
class TestApp(wx.App):
def OnInit(self):
command = "cmd /c dir" # windows "ls" command
self.Bind(wx.EVT_WINDOW_DESTROY, self.Cleanup)
wx.MessageBox(os.getcwd())
try:
prog = subprocess.Popen(command, stdout=subprocess.PIPE)
lines = ""
prog.wait()
wx.MessageBox("Got:\n%s" % prog.stdout.read())
except Exception,e:
wx.MessageBox("Encountered problems with the command '%s'.
Aborting execution." % command)
wx.MessageBox("Message: '%s'" % e)
finally:
wx.MessageBox("Call done")
return True
def Cleanup(self, event):
wx.MessageBox("Closing")
if __name__ == '__main__':
tApp = TestApp(redirect = False)
tApp.MainLoop()
===================================================
I run:
Makespec.py test.py
Build.py test.spec
resulting warntest.txt:==============================
W: no module named posix (conditional import by os)
W: no module named optik.__all__ (top-level import by optparse)
W: no module named fcntl (top-level import by tempfile)
W: no module named pwd (delayed, conditional import by posixpath)
W: no module named gestalt (conditional import by ctypes)
W: no module named ctypes.windll (top-level import by readline.keysyms)
W: no module named org (top-level import by pickle)
W: no module named posix (delayed, conditional import by iu)
W: no module named fcntl (conditional import by subprocess)
W: no module named org (top-level import by copy)
W: no module named _emx_link (conditional import by os)
W: no module named optik.__version__ (top-level import by optparse)
W: no module named Carbon (conditional import by tempfile)
W: __all__ is built strangely at line 0 - __future__
(C:\Python25\lib\__future__.pyc)
W: delayed conditional __import__ hack detected at line 0 - doctest
(C:\Python25\lib\doctest.pyc)
W: delayed exec statement detected at line 0 - doctest
(C:\Python25\lib\doctest.pyc)
W: delayed __import__ hack detected at line 0 - encodings
(C:\Python25\lib\encodings\__init__.pyc)
W: __all__ is built strangely at line 0 - optparse
(d:\pyinstaller-1.3\optparse.pyc)
W: delayed __import__ hack detected at line 0 - ctypes
(C:\Python25\lib\ctypes\__init__.pyc)
W: delayed __import__ hack detected at line 0 - ctypes
(C:\Python25\lib\ctypes\__init__.pyc)
W: __all__ is built strangely at line 0 - dis (C:\Python25\lib\dis.pyc)
W: delayed eval hack detected at line 0 - os (C:\Python25\lib\os.pyc)
W: delayed conditional __import__ hack detected at line 0 - unittest
(C:\Python25\lib\unittest.pyc)
W: delayed conditional __import__ hack detected at line 0 - unittest
(C:\Python25\lib\unittest.pyc)
W: __all__ is built strangely at line 0 - tokenize
(C:\Python25\lib\tokenize.pyc)
W: delayed conditional exec statement detected at line 0 - iu
(d:\pyinstaller-1.3\iu.pyc)
W: delayed conditional exec statement detected at line 0 - iu
(d:\pyinstaller-1.3\iu.pyc)
W: __all__ is built strangely at line 0 - wx
(C:\Python25\lib\site-packages\wx-2.8-msw-unicode\wx\__init__.pyc)
W: __all__ is built strangely at line 0 - wx
(C:\Python25\lib\site-packages\wx-2.8-msw-unicode\wx\__init__.pyc)
W: delayed __import__ hack detected at line 0 - pickle
(C:\Python25\lib\pickle.pyc)
W: delayed __import__ hack detected at line 0 - pickle
(C:\Python25\lib\pickle.pyc)
W: delayed eval hack detected at line 0 - gettext (C:\Python25\lib\gettext.pyc)
W: delayed __import__ hack detected at line 0 - optik.option_parser
(d:\pyinstaller-1.3\optik\option_parser.pyc)
W: delayed conditional eval hack detected at line 0 - warnings
(C:\Python25\lib\warnings.pyc)
W: delayed conditional __import__ hack detected at line 0 - warnings
(C:\Python25\lib\warnings.pyc)
W: __all__ is built strangely at line 0 - optik
(d:\pyinstaller-1.3\optik\__init__.pyc)
W: delayed exec statement detected at line 0 - bdb (C:\Python25\lib\bdb.pyc)
W: delayed eval hack detected at line 0 - bdb (C:\Python25\lib\bdb.pyc)
W: delayed eval hack detected at line 0 - bdb (C:\Python25\lib\bdb.pyc)
W: delayed exec statement detected at line 0 - pdb (C:\Python25\lib\pdb.pyc)
W: delayed conditional eval hack detected at line 0 - pdb
(C:\Python25\lib\pdb.pyc)
W: delayed eval hack detected at line 0 - pdb (C:\Python25\lib\pdb.pyc)
W: delayed conditional eval hack detected at line 0 - pdb
(C:\Python25\lib\pdb.pyc)
W: delayed eval hack detected at line 0 - pdb (C:\Python25\lib\pdb.pyc)
===================================================
The program works that way. But if I use the -w parameter (needed to
activate the wxPython Windows XP Theme (and other stuff too, I
presume):
* warntest.txt does not change
* the try-except block in the code catches an exception and tells me
the Message: 'an integer is required'
Please help me, I would need this soon...
Hannes Müller
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---