Hello Ronald,

>>
>> maybe somebody can help me with the following problem:
>>
>> is there a way to retrieve the complete arguments that where given to
>> the (Mac)Python interpreter (from within the first script that gets
>> executed with it)?
>>
>> i would like to receive the -psn_* argument that was given to the
>> python interpreter in my custom
>> bundle:
>>
>> myApp.app/Contents/MacOS/Python             # the python interpreter
>> myApp.app/Contents/Resources/myApp.py # the script that is executed
>> by the above interpreter
>>
>> i hope that inserting the -psn_* argument given to the interpreter
>> into sys.argv or NSProcessInfo arguments
>> before calling AppHelper.runEventLoop() will register my  application
>> with the dock and the window/menu manager
>>
>
>
> How are you building your application bundle? I've never had  
> problems getting my application's icon in the dock, even before  
> using py2app.
>

My bundle is a modification of a bundle that was generated by  
Bundlebuilder.
The difference is that I don't spawn another interpreter process via  
os.execve but
execute the interpreter with my main application script directly.

Anyway, I found out that I made a false assumption. I thought that  
the interpreter is
somehow hiding the -psn_* argument from me. But I found out that this  
argument is
only appended if the executable in myApp.app/Contents/MacOS/ is  
called myApp.
After renaming the interpreter I got the desired behavior.

Nevertheless, thanks for your offer to help,
yours kodi



_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to