[Python-checkins] python/dist/src/Mac/Tools/IDE PythonIDE.py,1.10,1.11

jackjansen@projects.sourceforge.net jackjansen@projects.sourceforge.net
Mon, 18 Nov 2002 07:29:07 -0800


Update of /cvsroot/python/python/dist/src/Mac/Tools/IDE
In directory sc8-pr-cvs1:/tmp/cvs-serv630

Modified Files:
	PythonIDE.py 
Log Message:
Another workaround, to find the IDE directory when we're in MacPython-OSX
on Jaguar.

Ceteram censeam W era packagendam esse.


Index: PythonIDE.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/PythonIDE.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** PythonIDE.py	31 Aug 2002 01:22:37 -0000	1.10
--- PythonIDE.py	18 Nov 2002 15:29:02 -0000	1.11
***************
*** 21,24 ****
--- 21,27 ----
  	widgetrespathsegs = [sys.exec_prefix, "Mac", "Tools", "IDE", "Widgets.rsrc"]
  	widgetresfile = os.path.join(*widgetrespathsegs)
+ 	if not os.path.exists(widgetresfile):
+ 		widgetrespathsegs = [os.pardir, "Tools", "IDE", "Widgets.rsrc"]
+ 		widgetresfile = os.path.join(*widgetrespathsegs)
  	refno = macresource.need('CURS', 468, widgetresfile)
  	if os.environ.has_key('PYTHONIDEPATH'):
***************
*** 29,32 ****
--- 32,42 ----
  		idepathsegs = [sys.exec_prefix, "Mac", "Tools", "IDE"]
  		ide_path = os.path.join(*idepathsegs)
+ 		if not os.path.exists(ide_path):
+ 			idepathsegs = [os.pardir, "Tools", "IDE"]
+ 			for p in sys.path:
+ 				ide_path = os.path.join(*([p]+idepathsegs))
+ 				if os.path.exists(ide_path):
+ 					break
+ 		
  	else:
  		# We are a fully frozen application