Ignore:
Timestamp:
15/10/18 10:56:37 (12 months ago)
Author:
mjuckes
Message:

01.00.28

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMIP6dreq/trunk/dreqPy/extensions/versions.py

    r1244 r1265  
    1414        n0 += 1 
    1515        if lst != None: 
    16           print 'Only in %s: %s [%s]' % (oth.version, k, that._uidDict[k].label ) 
     16          print ( 'Only in %s: %s [%s]' % (oth.version, k, that._uidDict[k].label ) )  
    1717 
    1818    for k in sorted( this._uidDict.keys() ): 
     
    2020        n1 += 1 
    2121        if lst != None: 
    22           print 'Only in %s: %s [%s]' % (self.version, k, this._uidDict[k].label ) 
     22          print ( 'Only in %s: %s [%s]' % (self.version, k, this._uidDict[k].label ) ) 
    2323      elif this._uidDict[k].__dict__ != that._uidDict[k].__dict__: 
    2424        n2 += 1 
     
    3030          cc[i] += 1 
    3131        if lst == 'long': 
    32           print 'Changed in %s -- %s: %s [%s], {%s|%s|%s}' % (self.version,oth.version, k, this._uidDict[k].label, str(s1),str(s2),str(s3) ) 
     32          print ('Changed in %s -- %s: %s [%s], {%s|%s|%s}' % (self.version,oth.version, k, this._uidDict[k].label, str(s1),str(s2),str(s3) ) ) 
    3333 
    3434    if n0 == 0 and n1 == 0: 
    35       print '%s (%s --> %s):: No additons or removals' % (sect,oth.version,self.version) 
     35      print ('%s (%s --> %s):: No additons or removals' % (sect,oth.version,self.version) ) 
    3636    else: 
    37       print '%s (%s --> %s):: Added %s, Removed %s' % (sect,oth.version,self.version,n1,n0) 
    38     print '%s:: Number changed in %s -- %s: %s' % (sect, self.version,oth.version,n2) 
     37      print ('%s (%s --> %s):: Added %s, Removed %s' % (sect,oth.version,self.version,n1,n0) ) 
     38    print ('%s:: Number changed in %s -- %s: %s' % (sect, self.version,oth.version,n2) ) 
    3939    if n2 > 0: 
    4040      msg = '; '.join( ['%s: %s' % (k,cc[k]) for k in sorted(cc.keys())] ) 
    41       print '%s:: Attribute changes: %s' % (sect,msg) 
     41      print ('%s:: Attribute changes: %s' % (sect,msg) ) 
    4242 
    4343def fetch(self,version=None, vdir=None): 
     
    5454      page = requests.get(u) 
    5555      md5 = hashlib.md5(page.text.encode('utf-8')).hexdigest() 
    56       print version, f, md5 
     56      print ( (version, f, md5 ) ) 
    5757      oo = open( '%s/%s/%s' % (vdir,version,f), 'w' ) 
    5858      oo.write( page.text.encode('utf-8') ) 
Note: See TracChangeset for help on using the changeset viewer.