Re: [Pythonmac-SIG] python interpreter arguments?

2006-05-20 Thread Thorsten Kohnhorst
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


[Pythonmac-SIG] question about ic.py on Mac OS X

2006-05-20 Thread Ishwinder Kaur Banga
MAC OS version 10.4.6
Python Version 2.4.1

Problem is that the url is valid but the python icglue tells me that  
it is not found

Please help

Error

Traceback (most recent call last):
   File dialect.py, line 166, in ?
 test(http://diveintopython.org/odbchelper_list.html;)
   File dialect.py, line 163, in test
 webbrowser.open_new(outfile)
   File /usr/local/lib/python2.4/webbrowser.py, line 46, in open_new
 get().open(url, 1)
   File /usr/local/lib/python2.4/webbrowser.py, line 315, in open
 ic.launchurl(url)
   File /usr/local/lib/python2.4/plat-mac/ic.py, line 235, in  
launchurl
 return _dft_ic.launchurl(url, hint)
   File /usr/local/lib/python2.4/plat-mac/ic.py, line 202, in  
launchurl
 self.ic.ICLaunchURL(hint, url, 0, len(url))
MacOS.Error: (-673, 'no URL found')
---
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] question about ic.py on Mac OS X

2006-05-20 Thread Nicholas Riley
On Sat, May 20, 2006 at 09:21:06PM -0400, Ishwinder Kaur Banga wrote:
 MAC OS version 10.4.6
 Python Version 2.4.1
 
 Problem is that the url is valid but the python icglue tells me that  
 it is not found

Are you on PPC or x86?

Does this happen with the current Python 2.4.3 or the built-in Python
2.3.5?

Does this happen when opening URLs using Launch Services, or with
Internet Config in other apps?  (You can try my 'launch' tool - with
the -l option it uses IC, without it, it uses LS).

-- 
Nicholas Riley [EMAIL PROTECTED] | http://www.uiuc.edu/ph/www/njriley
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig