[Python-checkins] CVS: python/dist/src/Mac/Tools/IDE PythonIDE.py,1.8,1.8.14.1

Jack Jansen jackjansen@users.sourceforge.net
Sun, 24 Feb 2002 15:16:03 -0800


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

Modified Files:
      Tag: release22-maint
	PythonIDE.py 
Log Message:
Backport of 1.9:
Changes by Donovan Preston (and a few minor ones by me) to make IDE run under
MachoPython. Mainly making sure we don't call routines that don't exist
and representing pathnames in a os.separator-neutral format.

These shouldn't interfere too much with Just's work on the next generation IDE,
I hope.



Index: PythonIDE.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/PythonIDE.py,v
retrieving revision 1.8
retrieving revision 1.8.14.1
diff -C2 -d -r1.8 -r1.8.14.1
*** PythonIDE.py	27 Aug 2001 21:39:22 -0000	1.8
--- PythonIDE.py	24 Feb 2002 23:16:01 -0000	1.8.14.1
***************
*** 5,13 ****
  
  __version__ = '1.0.1'
! 
  
  def init():
  	import MacOS
! 	MacOS.EnableAppswitch(-1)
  	
  	from Carbon import Qd, QuickDraw
--- 5,15 ----
  
  __version__ = '1.0.1'
! import sys
! import os
  
  def init():
  	import MacOS
! 	if hasattr(MacOS, 'EnableAppswitch'):
! 		MacOS.EnableAppswitch(-1)
  	
  	from Carbon import Qd, QuickDraw
***************
*** 17,25 ****
  	import sys, os
  	macresource.need('DITL', 468, "PythonIDE.rsrc")
! 	widgetresfile = os.path.join(sys.exec_prefix, ":Mac:Tools:IDE:Widgets.rsrc")
  	refno = macresource.need('CURS', 468, widgetresfile)
  	if refno:
  		# We're not a fullblown application
! 		ide_path = os.path.join(sys.exec_prefix, ":Mac:Tools:IDE")
  	else:
  		# We are a fully frozen application
--- 19,29 ----
  	import sys, os
  	macresource.need('DITL', 468, "PythonIDE.rsrc")
! 	widgetrespathsegs = [sys.exec_prefix, "Mac", "Tools", "IDE", "Widgets.rsrc"]
! 	widgetresfile = os.path.join(*widgetrespathsegs)
  	refno = macresource.need('CURS', 468, widgetresfile)
  	if refno:
  		# We're not a fullblown application
! 		idepathsegs = [sys.exec_prefix, "Mac", "Tools", "IDE"]
! 		ide_path = os.path.join(*idepathsegs)
  	else:
  		# We are a fully frozen application