- Timestamp:
- Aug 7, 2006, 9:26:29 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/apps/rerun
r299 r501 79 79 80 80 # prepare text variables 81 myTmpFile = tempfile.NamedTemporaryFile()82 outCmd = '<command>echo =RAPPTURE-RUN=>%s</command>' % myTmpFile.name83 81 myTmpFilefd, myTmpFileName = tempfile.mkstemp() 82 myTmpFile = os.fdopen(myTmpFilefd,'w+b') 83 outCmd = '<command>echo =RAPPTURE-RUN=>' + myTmpFileName.encode('string_escape') + '</command>' 84 84 # do the file <command> switheroo! 85 85 xmlfile = open(runFile, "rb").read() … … 89 89 90 90 # run driver on the temporary run file 91 print "myTmpFile .name = %s" % (myTmpFile.name)92 systemCmd = '%s -tool %s' % (driverPath, myTmpFile .name)91 print "myTmpFileName = %s" % (myTmpFileName) 92 systemCmd = '%s -tool %s' % (driverPath, myTmpFileName) 93 93 os.system(systemCmd) 94 94 … … 96 96 97 97 # clean up our tmp file 98 # t he tempfile module deletes the file automatically when closed98 # tempfile module does not auto delete files created by mkstemp on close 99 99 myTmpFile.close() 100 os.remove(myTmpFileName) 100 101 101 102 # exit gracefully
Note: See TracChangeset
for help on using the changeset viewer.