예제 #1
0
 def get_load_file_name_using_PyFace_FileDialog(self, title):
     fd = FileDialog(
         wildcard=self.wildcard,
         title=title,
         default_filename=self.model._params_file,
         default_directory=self.model.directory
     )
     if fd.open() == OK:
         return fd.path
     return None
예제 #2
0
 def _wildcard_default(self):
     try:
         import os
         toolkit = os.environ['ETS_TOOLKIT']
     except KeyError:
         toolkit = 'wx'
     wildcard = ''
     if toolkit == 'qt4':
         for i, w in enumerate(self.filters):
             wildcard += FileDialog.create_wildcard(w[0], w[1])
     else: # assume os.environ['ETS_TOOLKIT'] == ('wx' and not 'null')
         for i, w in enumerate(self.filters):
             # wx: 'py and test (*.py *.test)|*.py;*.test|\ntest (*.test)|*.test|\npy (*.py)|*.py'#|
             w2 = ';'.join(w[1])
             wildcard += '%s (%s)|%s' % (w[0], w2, w2)
             if i < len(self.filters) - 1:
                 wildcard += '|'
     return wildcard
예제 #3
0
 def _create_control(self, parent):
     dlg = FileDialog._create_control(self, parent)
     dlg.setDefaultSuffix(self.default_suffix)
     return dlg