I sent this to the wxPython-mac list but didn't receive a reply; I'm hoping someone can lend a hand here on the more generic wxPython list.
I'm working on a wxPython application using the new release, 2.5.1. I'm
developing on Mac OS X, and was trying to use bundlebuilder.py to create
a standalone app.
I followed the example code in both the python.org and pythonmac.org
wikis, but when I double-click the resulting application, it opens, and
then closes immediately. I added some print statements, and observed
the console; there are no error messages printed, and it gets through
the entire initialization. Actually it even passes the app.MainLoop()
call without an error (and then, of course, exits).
The only thing I see that looks a little amiss is that in the app
bundles contents/MacOS, I see my app name (ccTag) and python, not
pythonw. Is that a problem? Has anyone else run into this? Thanks for
your help.
I figured the problem out, but I'm not sure how I feel about it. I was trying to load my main form from an XRC file, and the problem was that when I tried to load the file, it wasn't in the right location due to the way the Mac OS X bundle is constructed. Should this have raised an error of some sort? Just wondering. Anyway, that was the problem; when I did an experiment with an absolute path to the XRC file, it worked as expected.
Nathan
Nathan Yergler wrote:
···
I sent this to the wxPython-mac list but didn't receive a reply; I'm hoping someone can lend a hand here on the more generic wxPython list.
I'm working on a wxPython application using the new release, 2.5.1. I'm
developing on Mac OS X, and was trying to use bundlebuilder.py to create
a standalone app.
I followed the example code in both the python.org and pythonmac.org
wikis, but when I double-click the resulting application, it opens, and
then closes immediately. I added some print statements, and observed
the console; there are no error messages printed, and it gets through
the entire initialization. Actually it even passes the app.MainLoop()
call without an error (and then, of course, exits).
The only thing I see that looks a little amiss is that in the app
bundles contents/MacOS, I see my app name (ccTag) and python, not
pythonw. Is that a problem? Has anyone else run into this? Thanks for
your help.
Nathan R. Yergler
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
I haven't had much luck with semi, but standalone works (albeit much larger bundles).
···
On Apr 11, 2004, at 1:45 PM, Nathan Yergler wrote:
I followed the example code in both the python.org and pythonmac.org
wikis, but when I double-click the resulting application, it opens, and
then closes immediately. I added some print statements, and observed
the console; there are no error messages printed, and it gets through
the entire initialization. Actually it even passes the app.MainLoop()
call without an error (and then, of course, exits).
Perhaps you need to get the path from sys.argv[0] or the __file__ attribute of your main module and then construct relative paths based on that for loading your XRC...? Alternatively, do a os.chdir() when the app loads. Just a guess...
ka
···
On Apr 11, 2004, at 5:58 PM, Nathan Yergler wrote:
I figured the problem out, but I'm not sure how I feel about it. I was trying to load my main form from an XRC file, and the problem was that when I tried to load the file, it wasn't in the right location due to the way the Mac OS X bundle is constructed. Should this have raised an error of some sort? Just wondering. Anyway, that was the problem; when I did an experiment with an absolute path to the XRC file, it worked as expected.
Nathan
Nathan Yergler wrote:
I sent this to the wxPython-mac list but didn't receive a reply; I'm hoping someone can lend a hand here on the more generic wxPython list.
I'm working on a wxPython application using the new release, 2.5.1. I'm
developing on Mac OS X, and was trying to use bundlebuilder.py to create
a standalone app.
I followed the example code in both the python.org and pythonmac.org
wikis, but when I double-click the resulting application, it opens, and
then closes immediately. I added some print statements, and observed
the console; there are no error messages printed, and it gets through
the entire initialization. Actually it even passes the app.MainLoop()
call without an error (and then, of course, exits).
The only thing I see that looks a little amiss is that in the app
bundles contents/MacOS, I see my app name (ccTag) and python, not
pythonw. Is that a problem? Has anyone else run into this? Thanks for
your help.
I figured the problem out, but I'm not sure how I feel about it. I was trying to load my main form from an XRC file, and the problem was that when I tried to load the file, it wasn't in the right location due to the way the Mac OS X bundle is constructed. Should this have raised an error of some sort? Just wondering. Anyway, that was the problem; when I did an experiment with an absolute path to the XRC file, it worked as expected.
You should probably put the XRC file into the Contents/Resources dir inside the bundle. That will be the location of your main .py file and so you can easily find it's location as Kevin suggested and read your XRC resources from the same location.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
I am as well. However, I thought they were working on a new standalone launcher so that python wasn't required on the remote computer for launching or for your app's runtime... Maybe I misunderstood the plan.
···
On Apr 15, 2004, at 5:02 PM, Chris Barker wrote:
I'm waiting for Bob Ippolito to release BundleBuilder2, it should be a little easier, and will only do semi-standalone
I am as well. However, I thought they were working on a new standalone launcher so that python wasn't required on the remote computer for launching or for your app's runtime... Maybe I misunderstood the plan.
I think you did. the new launcher doesn't require python for launching, but then uses the Apple supplied python for running. I misspoke a little, I think it will do standalone for Jaguar, but not for Panther, because Panther is guaranteed to have a decent Python on the users system. My argument is that it is not guaranteed that there will be a decent python 2.3 on future versions of OS-X, but I guess we'll cross that bridge when we come to it.
By the way, this belongs more on the python-mac list, if you want to know more.
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception