Changeset 906

Show
Ignore:
Timestamp:
08/08/08 11:57:01 (5 months ago)
Author:
sontag
Message:

for ticket #87; have both tpar and epar call iraf.newSpecialParFile() when one has been created; change epar so that by default it looks in uparm_aux for such files

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/epar.py

    r903 r906  
    824824                fname = flist[0] 
    825825        else: # len(flist) > 0 
     826            flist.sort() 
    826827            ld = listdlg.ListSingleSelectDialog("Select Parameter File", 
    827828                         "Select which parameter file to load for "+ \ 
     
    841842 
    842843        # The user wishes to save to a different name 
    843         fd = filedlg.PersistSaveFileDialog(self.top, "Save Parameter File As", 
    844                                            "*.par") 
     844        # (could use Tkinter's FileDialog, but this one is prettier) 
     845        filt = '*.par' 
     846        upx = iraf.envget("uparm_aux","") 
     847        if len(upx) > 0:  filt = upx+"/*.par" 
     848        fd = filedlg.SaveFileDialog(self.top, "Save Parameter File As", filt) 
    845849        if fd.Show() != 1: 
    846850            fd.DialogCleanup() 
     
    886890 
    887891        print "Saved "+self.taskName+" parameter values to: "+fname 
     892         
     893        # Notify irafpar that there is a new special-purpose file on the scene 
     894        irafpar.newSpecialParFile(self.taskName, self.pkgName, fname) 
    888895 
    889896 
  • trunk/lib/tpar.py

    r900 r906  
    962962        okdlg.main() 
    963963 
     964        # Notify irafpar that there is a new special-purpose file on the scene 
     965        irafpar.newSpecialParFile(self.taskName, self.pkgName, fname) 
    964966 
    965967    def save(self, emph): 
     
    11431145 
    11441146    def select_file(self, prompt, overwriteCheck=False): 
    1145         """ Allow user to select a file - handle whether it is expected 
     1147        """ Allow user to input a file - handle whether it is expected 
    11461148        to be new or existing. Returns file name on success, None on error. """ 
    11471149