I'm trying to get the wxPython module to work with my app which has
Python embedded in it. I'll be running this app on machines that don't
have Python installed on them so wxPython will have to be distributed
along with the app. When I have Python+wxPython installed, everything
works and I'm able to do a "import wx" with no problems. If I try this
with no installed copy of Python then it crashes as soon as it reaches
"import wx". I packaged the standard library into 'python26.zip' and
wxPython into a 'wx.zip'. Both these are added to "sys.path" before I
try importing wxPython. I'm using Python 2.6.2, wxPython 2.8.10.1 and
wxWidgets 2.8.10 on Windows Vista with Visual Studio 2008.
Could someone please tell me what could be wrong here? And is there
any standard way of distributing 3rd party libraries along with your
application?
On Sep 2, 5:13 am, Varun <nig...@gmail.com> wrote:
Hi everyone,
I'm trying to get the wxPython module to work with my app which has
Python embedded in it. I'll be running this app on machines that don't
have Python installed on them so wxPython will have to be distributed
along with the app. When I have Python+wxPython installed, everything
works and I'm able to do a "import wx" with no problems. If I try this
with no installed copy of Python then it crashes as soon as it reaches
"import wx". I packaged the standard library into 'python26.zip' and
wxPython into a 'wx.zip'. Both these are added to "sys.path" before I
try importing wxPython. I'm using Python 2.6.2, wxPython 2.8.10.1 and
wxWidgets 2.8.10 on Windows Vista with Visual Studio 2008.
Could someone please tell me what could be wrong here? And is there
any standard way of distributing 3rd party libraries along with your
application?
Thanks,
Varun
I use GUI2Exe, which is a wrapper for py2exe. It can create a binary
with all the necessary stuff in it.
I'm trying to get the wxPython module to work with my app which has
Python embedded in it.
Is it a wxWidgets app or is wxPython the only place that wx will be used?
I'll be running this app on machines that don't
have Python installed on them so wxPython will have to be distributed
along with the app. When I have Python+wxPython installed, everything
works and I'm able to do a "import wx" with no problems. If I try this
with no installed copy of Python then it crashes as soon as it reaches
"import wx".
Crashes in what way? Is there a Python traceback? Any wx asserts or log messages? Is it a hard crash of your whole embedding application, and if so are you able to see the location of the crash in the debugger?
I packaged the standard library into 'python26.zip' and
wxPython into a 'wx.zip'. Both these are added to "sys.path" before I
try importing wxPython. I'm using Python 2.6.2, wxPython 2.8.10.1 and
wxWidgets 2.8.10 on Windows Vista with Visual Studio 2008.
Could someone please tell me what could be wrong here? And is there
any standard way of distributing 3rd party libraries along with your
application?
Is it just a zip of the whole wx package dir or do you do something besides that to create the zip file? Have you tried it by providing the wx package in unzipped form? Have you tried it without putting the .pyd or .dll files in the zip but just making them available outside of the zip somewhere on the embedded Python's sys.path?