def cb_view(self):
      """create permanent windows with given text"""
      if show_func_seq: print '=== xN ==='

      obj = self.sender()

      if obj == self.gvars.act_view_script:
         self.show_static_file('file_proc', 'ttest script:')

      elif obj == self.gvars.act_view_output:
         self.show_static_file('output_proc', 'script output:')

      elif obj == self.gvars.act_view_cmd:
         sstr = self.make_uber_command()
         QLIB.static_TextWindow(title='corresp. uber_ttest.py command',
                                text=sstr, parent=self)

      elif obj == self.gvars.act_view_uvars:
         sstr = self.uvars.make_show_str('current ttest test', name=0)
         QLIB.static_TextWindow(title='user vars', text=sstr, parent=self)

      elif obj == self.gvars.act_view_cvars:
         sstr = self.cvars.make_show_str('control vars', name=0, all=0)
         QLIB.static_TextWindow(title='control vars', text=sstr, parent=self)

      elif obj == self.gvars.act_view_gvars:
         sstr = self.gvars.make_show_str('GUI vars', name=0, all=1)
         QLIB.static_TextWindow(title='GUI vars', text=sstr, parent=self)

      else: print '** unhandled object in cb_view'
Ejemplo n.º 2
0
    def cb_view(self):
        """create permanent windows with given text"""
        obj = self.sender()

        if obj == self.gvars.act_view_script:
            self.show_static_file('file_proc', 'align script:')

        elif obj == self.gvars.act_view_output:
            self.show_static_file('output_proc', 'script output:')

        elif obj == self.gvars.act_view_cmd:
            sstr = self.make_uber_command()
            QLIB.static_TextWindow(title='corresp. uber_skel.py command',
                                   text=sstr,
                                   parent=self)

        elif obj == self.gvars.act_view_uvars:
            sstr = self.uvars.make_show_str('current align test', name=0)
            QLIB.static_TextWindow(title='user vars', text=sstr, parent=self)

        elif obj == self.gvars.act_view_cvars:
            sstr = self.cvars.make_show_str('control vars', name=0, all=0)
            QLIB.static_TextWindow(title='control vars',
                                   text=sstr,
                                   parent=self)

        elif obj == self.gvars.act_view_gvars:
            sstr = self.gvars.make_show_str('GUI vars', name=0, all=1)
            QLIB.static_TextWindow(title='GUI vars', text=sstr, parent=self)

        else:
            print '** unhandled object in cb_view'
 def show_static_file(self, var_name, var_desc):
    """display the var according to var_name
       - use description in var_desc if any error"""
    if self.atest == None:        # check for generated command
       self.update_warn_window('** script must be generated first')
       return
    file = self.atest.proc_dir_filename(var_name)
    if not file:
       self.update_warn_window('** file not set: %s' % var_desc)
       return
    elif not os.path.isfile(file):
       self.update_warn_window('** file not found: %s\n' \
                               '   (used for %s)'%(file, var_desc))
       return
    else:
       title = '%s %s' % (var_desc, file)
       QLIB.static_TextWindow(title=title, fname=file, parent=self)
Ejemplo n.º 4
0
 def show_static_file(self, var_name, var_desc):
     """display the var according to var_name
      - use description in var_desc if any error"""
     if self.atest == None:  # check for generated command
         self.update_warn_window('** script must be generated first')
         return
     file = self.atest.proc_dir_filename(var_name)
     if not file:
         self.update_warn_window('** file not set: %s' % var_desc)
         return
     elif not os.path.isfile(file):
         self.update_warn_window('** file not found: %s\n' \
                                 '   (used for %s)'%(file, var_desc))
         return
     else:
         title = '%s %s' % (var_desc, file)
         QLIB.static_TextWindow(title=title, fname=file, parent=self)