def read(self): self.process.stdin.close() text = self.process.stdout.read() self.process.stdout.close() self.process.wait() deleteFile(self.file) return text
def outputString(self): self.process.stdin.close() text = self.process.stdout.read() self.process.stdout.close() self.process.wait() deleteFile(self.file) return text
def removeTempFile(self): if os.path.exists(self.tempFile): utils.deleteFile(self.tempFile)
def close(self): self.process.stdin.close() self.process.stdout.close() self.process.wait() deleteFile(self.file)
def _system(self, command): if self.bundleItem != None: command, environment, tempFile = prepareShellScript(unicode(command), self.bundleItem.buildEnvironment()) process = Popen(command, stdout = PIPE, stdin = PIPE, stderr = STDOUT, env = environment) self.mainFrame.addToJavaScriptWindowObject("_systemWrapper", SystemWrapper(process, command)) deleteFile(tempFile)