Logo Search packages:      
Sourcecode: pymol version File versions

def pmg_tk::startup::apbs_tools::PmwFileDialog::fillit (   self  ) 

Get the directory list and show it in the two listboxes

Definition at line 1693 of file apbs_tools.py.

01693                     :
      """Get the directory list and show it in the two listboxes"""
        # Do not run unnecesarily
        if self.lastdir==self['directory'] and self.lastfilter==self['filter'] and self.lasttime>os.stat(self.lastdir)[8]:
            return
        self.lastdir=self['directory']
        self.lastfilter=self['filter']
        self.lasttime=time.time()
      dir=self['directory']
      if not dir:
          dir=os.getcwd()
      dirs=['..']
      files=[]
        try:
            fl=os.listdir(dir)
            fl.sort()
        except os.error,arg:
            if arg[0] in (2,20):
                return
            raise
      for f in fl:
          if os.path.isdir(os.path.join(dir,f)):
            dirs.append(f)
          else:
            filter=self['filter']
            if not filter:
                filter='*'
            if fnmatch.fnmatch(f,filter):
                files.append(f)
      self.component('filenamebox').setlist(files)
      self.component('dirnamebox').setlist(dirs)
    
    def validate(self,filename):


Generated by  Doxygen 1.6.0   Back to index