Changeset 920 for trunk/UTIL/PYTHON/planetoplot_v2/ppclass.py
- Timestamp:
- Mar 29, 2013, 5:55:09 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/planetoplot_v2/ppclass.py
r917 r920 172 172 # print status 173 173 def printstatus(self): 174 print "**** Done step: " + self.status 174 if self.filename == "THIS_IS_A_CLONE": 175 pass 176 else: 177 print "**** Done step: " + self.status 175 178 176 179 ##################################################### … … 216 219 setattr(the_clone,k,v) 217 220 the_clone.verbose = False 221 the_clone.filename = "THIS_IS_A_CLONE" # trick to avoid additional outputs 218 222 the_clone.define() 219 223 for i in range(self.nfin): … … 511 515 self.printstatus() 512 516 # check if things were done OK before 513 if self.status != "defined": print "!! ERROR !! Please use .define() to define your pp object." 517 if self.status != "defined": print "!! ERROR !! Please use .define() to define your pp object." ; exit() 514 518 ## first get fields 515 519 ## ... only what is needed is extracted from the files … … 777 781 if (self.n == self.howmanyplots): 778 782 ppplot.save(mode=self.out,filename=self.filename,folder=self.folder,custom=customplot) 783 mpl.close() 779 784 # SAVE A PICKLE FILE WITH THE self.p ARRAY OF OBJECTS 780 785 if self.verbose: print "**** Saving session in "+self.filename + ".ppobj" 781 786 savfile = self.folder + "/" + self.filename + ".ppobj" 782 filehandler = open(savfile, 'w') 783 pickle.dump(self.p, filehandler) 787 try: 788 filehandler = open(savfile, 'w') 789 pickle.dump(self.p, filehandler) 790 except IOError: 791 print "!! WARNING !! Saved object file not written. Probably do not have permission to write here." 784 792 785 793 ########################################################### … … 884 892 except: 885 893 try: self.p[iii].lstyle = opt.lstyle[0] 894 except: pass 895 ### 896 try: self.p[iii].color = opt.color[iii] 897 except: 898 try: self.p[iii].color = opt.color[0] 899 except: pass 900 ### 901 try: self.p[iii].marker = opt.marker[iii] 902 except: 903 try: self.p[iii].marker = opt.marker[0] 886 904 except: pass 887 905 ###
Note: See TracChangeset
for help on using the changeset viewer.