[Pythonmac-SIG] py2app and command line options

Robin Dunn robin at alldunn.com
Wed Jan 30 22:47:18 CET 2008


Christopher Barker wrote:
> Tobias Rodäbel wrote:
>> The -psn argument is a bit of an historical leftover. It stands for 
>> carbon process serial number.
> 
> great, thanks!
> 
> The question is, is it still useful?
> 
>> Set argv_emulation=True (in your setup.py in 
>> OPTIONS)
> 
> The thing is, I don't want argv_emulation -- that puts the name of 
> dropped files in argv, and this app can't do anything with dropped 
> files. It does take other args, though, and -psn was confusing it.
> 
>> or delete it within your application (__main__):
> 
> I can't do that, 'cause when it's not in an app bundle, that would break 
> something. I could put it in a if frozen: clause, I suppose.

Or this:

	if len(sys.argv) > 1 and sys.argv.startswith('-psn'):
		del sys.argv[1]

-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!



More information about the Pythonmac-SIG mailing list