[Python-checkins] python/dist/src/Mac/Tools/IDE PyEdit.py,1.35,1.36

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
Wed, 12 Feb 2003 07:38:47 -0800


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

Modified Files:
	PyEdit.py 
Log Message:
Create applets slightly differently: by saving the sourcecode to a
temporary location. This is needed to makethings work with the new
buildtools based on bundlebuilder.


Index: PyEdit.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/PyEdit.py,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** PyEdit.py	6 Feb 2003 22:32:35 -0000	1.35
--- PyEdit.py	12 Feb 2003 15:38:37 -0000	1.36
***************
*** 455,458 ****
--- 455,468 ----
  		except (SyntaxError, EOFError):
  			raise buildtools.BuildError, "Syntax error in script %s" % `filename`
+ 			
+ 		import tempfile
+ 		tmpdir = tempfile.mkdtemp()
+ 		
+ 		if filename[-3:] != ".py":
+ 			filename = filename + ".py"
+ 		filename = os.path.join(tmpdir, os.path.split(filename)[1])
+ 		fp = open(filename, "w")
+ 		fp.write(pytext)
+ 		fp.close()
  		
  		# Try removing the output file
***************
*** 462,466 ****
  			pass
  		template = buildtools.findtemplate()
! 		buildtools.process_common(template, None, code, rsrcname, destname, 0, 1)
  	
  	def domenu_gotoline(self, *args):
--- 472,476 ----
  			pass
  		template = buildtools.findtemplate()
! 		buildtools.process(template, filename, destname, rsrcname=rsrcname, progress=None)
  	
  	def domenu_gotoline(self, *args):