Ignore:
Timestamp:
02/11/19 04:14:06 (6 years ago)
Author:
bdef
Message:

CHG: pyhton 3 migration (not opperational yet)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/py3/classes/organizer.py

    r23670 r23709  
    66from savevars import savevars
    77from model import model
    8 from dbm import whichdb
     8from dbm.ndbm import whichdb
    99import MatlabFuncs as m
    1010
     
    8686                if os.path.exists(path):
    8787                        struc=loadvars(path)
    88                         name=name=[key for key in struc.keys()]
     88                        name=name=[key for key in list(struc.keys())]
    8989                        md=struc.name[0]
    9090                else:
     
    115115                                raise IOError("Could find neither '%s' nor '%s'" % (path,path2))
    116116                        else:
    117                                 print("--> Branching '%s' from trunk '%s'" % (self.prefix,self.trunkprefix))
     117                                print(("--> Branching '%s' from trunk '%s'" % (self.prefix,self.trunkprefix)))
    118118                                md=loadmodel(path2)
    119119                                return md
     
    142142                if 0 in self.requestedsteps:
    143143                        if self._currentstep==1:
    144                                 print("   prefix: %s" % self.prefix)
    145                         print("   step #%i : %s" % (self.steps[self._currentstep-1]['id'],self.steps[self._currentstep-1]['string']))
     144                                print(("   prefix: %s" % self.prefix))
     145                        print(("   step #%i : %s" % (self.steps[self._currentstep-1]['id'],self.steps[self._currentstep-1]['string'])))
    146146
    147147                #Ok, now if _currentstep is a member of steps, return true
    148148                if self._currentstep in self.requestedsteps:
    149                         print("\n   step #%i : %s\n" % (self.steps[self._currentstep-1]['id'],self.steps[self._currentstep-1]['string']))
     149                        print(("\n   step #%i : %s\n" % (self.steps[self._currentstep-1]['id'],self.steps[self._currentstep-1]['string'])))
    150150                        bool=True
    151151
     
    167167                else:
    168168                        name=os.path.join(self.repository,name)
    169                 print("saving model as: '%s'" % name)
     169                print(("saving model as: '%s'" % name))
    170170
    171171                #check that md is a model
Note: See TracChangeset for help on using the changeset viewer.