When testing by running from the command line, I get MacOpenFile
called for each of the command line arguments, e.g.:
python MacApp.py test1.txt test2.txt
it gets called for
MacApp.py
test1.txt
test2.txt
which doesn't happen with wx 2.8. Maybe the "argv emulation" is
turned on all the time, regardless of being bundled using py2app?
Any idea of a workaround? This is a program intended to be run both
from the command line and as an app bundle. I tried trimming sys.argv
before importing wx and that doesn't work -- wx seems to grab argv
ahead of time (or gets it straight from the C api).
I did notice that MacOpenFile is deprecated in wxWidgets 3.0 (&
Phoenix?) but MacOpenFiles (plural) doesn't seem to exist yet in
wxPython 2.9.
When testing by running from the command line, I get MacOpenFile
called for each of the command line arguments, e.g.:
python MacApp.py test1.txt test2.txt
it gets called for
MacApp.py
test1.txt
test2.txt
which doesn't happen with wx 2.8. Maybe the "argv emulation" is
turned on all the time, regardless of being bundled using py2app?
Hmm... Not sure why that is happening and don't have time to chase it down at the moment.
Any idea of a workaround? This is a program intended to be run both
from the command line and as an app bundle. I tried trimming sys.argv
before importing wx and that doesn't work -- wx seems to grab argv
ahead of time (or gets it straight from the C api).
I did notice that MacOpenFile is deprecated in wxWidgets 3.0 (&
Phoenix?) but MacOpenFiles (plural) doesn't seem to exist yet in
wxPython 2.9.
I've added MacOpenFiles for the next Classic preview build and release, although it's only lightly tested so far. Watch the wxPython-dev list for news about preview build availability.