Changeset 937 for CMIP6dreqbuild


Ignore:
Timestamp:
20/01/17 21:31:32 (3 years ago)
Author:
mjuckes
Message:

python3 ready

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMIP6dreqbuild/trunk/src/framework/dreqPy/overviewTabs.py

    r873 r937  
    188188    mhdr = [ '\\rot{80}{%s}' % hmap0.get(m,m) for m in self.mipsp + ['TOTAL',]] 
    189189    mhdrh = [ '<th><div><span>%s</span></div></th>' % hmap0.get(m,m) for m in self.mipsp + ['TOTAL','Unique','CALC']] 
    190     oo.write( string.join(['',] + mhdr, ' & ' ) + '\\\\ \n\\hline\n' ) 
    191     mmh.append( '<table>\n<tr class="rotate">' + string.join(['<th></th>',] + mhdrh ) + '</tr>\n' ) 
     190    oo.write( ' & '.join(['',] + mhdr ) + '\\\\ \n\\hline\n' ) 
     191    mmh.append( '<table>\n<tr class="rotate">' + ''.join(['<th></th>',] + mhdrh ) + '</tr>\n' ) 
    192192    htmltmpl_head = '<html><body>\n'  
    193193 
     
    222222               for t in self.cc[m].dd[m2][k]: 
    223223                 oo1.write( '\n</tr><tr>\n' ) 
    224                  oo1.write( string.join( ['<td>%s</td>' % x for x in t ] ) + '\n' ) 
     224                 oo1.write( ''.join( ['<td>%s</td>' % x for x in t ] ) + '\n' ) 
    225225               oo1.write( '</tr></table></div>\n' ) 
    226226    
     
    242242            kc = '_%s_%s' % (m,m2) 
    243243            if m2 == 'TOTAL': 
    244               sm = string.join( ['%s: %s' % (k,vfmt(cct[k]*2.)) for k in sorted( cct ) ], '; ' ) 
     244              sm = '; '.join( ['%s: %s' % (k,vfmt(cct[k]*2.)) for k in sorted( cct ) ] ) 
    245245              print ( '%s, %s' % (m,cct) ) 
    246246              s1 = '<b><span title="%s">%s</span></b>' % (sm,s) 
     
    250250                cct[k] += self.cc[kc].a[k] 
    251251            ll.append( s ) 
    252             sm = string.join( ['%s: %s' % (k,vfmt(self.cc[kc].a[k]*2.)) for k in sorted( self.cc[kc].a.keys() ) ], '; ' ) 
     252            sm = '; '.join( ['%s: %s' % (k,vfmt(self.cc[kc].a[k]*2.)) for k in sorted( self.cc[kc].a.keys() ) ] ) 
    253253 
    254254            if sss: 
     
    263263            print ( 'Failed to compute element: %s,%s  %s' % (m,m2, str(self.cc[m].a[m2]) ) ) 
    264264            raise 
    265       oo.write( string.join(ll, ' & ' ) + '\\\\ \n\\hline\n' ) 
     265      oo.write( ' & '.join(ll ) + '\\\\ \n\\hline\n' ) 
    266266      llh.append( '<a href="data/tabs02/requestVol_%s_%s_%s.xlsx">Workings</a>' % (m,self.tiermax, self.pmax) ) 
    267       mmh.append( '<tr>' + string.join(['<td>%s</td>' % x for x in llh] ) + '</tr>\n' ) 
     267      mmh.append( '<tr>' + ''.join(['<td>%s</td>' % x for x in llh] ) + '</tr>\n' ) 
    268268    mmh.append( '</table>' ) 
    269269    ttl = 'Data volume overview, upto tier %s and priority %s -- provisional' % (self.tiermax, self.pmax)  
     
    276276<a href="https://earthsystemcog.org/projects/wip/CMIP6DataRequest" title="Data Request CoG page">Data Request home page</a>.</b></p> 
    277277''' % {'ttl':ttl, 'defNat':defNat } 
    278     bdy += string.join( mmh, '\n' ) 
     278    bdy += '\n'.join( mmh ) 
    279279    ooh = open( 'tab01_%s_%s%s.html' % (self.tiermax,self.pmax,self.efnsfx), 'w' ) 
    280280    ooh.write( self.dq.pageTmpl % (ttl, jsh, './', './index.html', bdy ) ) 
Note: See TracChangeset for help on using the changeset viewer.