def runCommand(self, command): print command command, environment, tempFile = prepareShellScript( unicode(command), self.runningContext.environment) process = Popen(command, stdout=PIPE, stdin=PIPE, stderr=PIPE, env=environment) self.webView.page().mainFrame().addToJavaScriptWindowObject( "_systemWrapper", SystemWrapper(process, command))
def __enter__(self): #Build the full las environment with gui environment and support environment self.shellCommand, self.environment, self.tempFile = utils.prepareShellScript(self.shellCommand, self.environment) return self
def runCommand(self, command): print command command, environment, tempFile = prepareShellScript(unicode(command), self.runningContext.environment) process = Popen(command, stdout=PIPE, stdin=PIPE, stderr=PIPE, env=environment) self.webView.page().mainFrame().addToJavaScriptWindowObject("_systemWrapper", SystemWrapper(process, command))
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)
def __enter__(self): self.shellCommand, self.environment, self.tempFile = utils.prepareShellScript(self.shellCommand, self.environment) return self