예제 #1
0
파일: driver.py 프로젝트: michurin/scato
 def load(self, text):
     try:
         self.prog = StatementProg(TokenSequence(text))
     except LanguageException, w:
         self.prog = None
         self.window_generator(
             'Load-time error!',
             ((CloseButton, DoubleScrolledText(str(w), 40, 10))))
예제 #2
0
 def reread(self):
     if not self.filename is None:
         try:
             f = file(self.filename, 'r')
             self.filetext = f.read()
             f.close()
         except Exception, w:
             self.filetext = ''
             self.filename = None
             self.app.window_generator('Error!', (CloseButton, DoubleScrolledText(str(w), 40, 10)))
예제 #3
0
파일: driver.py 프로젝트: michurin/scato
 def go(self):
     for i in xrange(500):
         if self.context.prog is None:
             self.status_line('Done.')
             break
         self.context.status_line = None
         try:
             self.context.prog(self.context)
         except LanguageException, w:
             self.prog = None
             self.window_generator(
                 'Run-time error!',
                 ((CloseButton, DoubleScrolledText(str(w), 40, 10))))
             self.status_line('Run-time error!')
             break
         except KeyboardInterrupt, w:
             self.root.quit()
예제 #4
0
 def tort_stat(self):
     self.app.window_generator(
         'Tortoise status',
         (CloseButton,
          DoubleScrolledText(self.app.tortoise_driver.tortoise_status(), 40,
                             12)))
예제 #5
0
 def box_size(self):
     self.app.window_generator(
         'Geometry',
         (CloseButton,
          DoubleScrolledText(self.app.tortoise_driver.showbox(), 40, 14)))
예제 #6
0
 def showvars(self):
     self.app.window_generator(
         'Variables',
         (CloseButton,
          DoubleScrolledText(self.app.tortoise_driver.showvars(), 40, 20)))
예제 #7
0
 def help_license(self):
     self.app.window_generator(
         'License', (CloseButton, DoubleScrolledText(license_text, 60, 33)))
예제 #8
0
 def help_about(self):
     self.app.window_generator(
         'About', (CloseButton, DoubleScrolledText(about_text, 33, 10)))