コード例 #1
0
 def interpreter(self):
     c = Configuration()
     system = c.getSystem()
     command = c.getInterpreter(system)
     
     thread = RunThread(command)
     thread.start()
コード例 #2
0
 def terminal(self):
     c = Configuration()
     system = c.getSystem()
     command = c.getTerminal(system)
     
     thread = RunThread(command)
     thread.start()
コード例 #3
0
    def breakpointContext(self):
        code = ''
        lines = self.lines()

        c = Configuration()
        system = c.getSystem()

        if self.breakpointLine:
            for i in range(lines):
                if i < self.breakpointLine:
                    code += self.text(i)

        randomNumber = random.SystemRandom()
        number = randomNumber.randint(0, sys.maxsize)
        filename = 'temp_file_' + str(number) + '.py'

        try:
            with open(filename, 'w') as f:
                f.write(code)
                command = c.getRun(system).format(filename)
                thread = RunThread(command)
                thread.start()

        except Exception as e:
            print(str(e))

        finally:
            time.sleep(2)
            os.remove(filename)
コード例 #4
0
 def run(self):
     self.save()
     c = Configuration()
     system = c.getSystem()
     command = c.getRun(system).format(self.textPad.filename)
     
     if not self.textPad.filename:
         self.statusBar.showMessage("can't run without filename !", 3000)
         return 
         
     thread = RunThread(command)
     thread.start()