File tree Expand file tree Collapse file tree 5 files changed +29
-22
lines changed Expand file tree Collapse file tree 5 files changed +29
-22
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env python 
2+ 
3+ from  __future__ import  print_function 
24import  fileinput 
35import  glob 
46import  os 
@@ -58,7 +60,7 @@ def latex():
5860
5961        os .chdir ('../..' )
6062    else :
61-         print   'latex build has not been tested on windows' 
63+         print ( 'latex build has not been tested on windows' ) 
6264
6365def  clean ():
6466    shutil .rmtree ("build" , ignore_errors = True )
Original file line number Diff line number Diff line change 11#!/usr/bin/env python 
2+ 
3+ from  __future__ import  print_function 
24import  sys , os , glob 
35import  matplotlib 
46import  IPython .Shell 
1214           ('pdf' , 72 )]
1315
1416def  figs ():
15-     print   'making figs' 
17+     print ( 'making figs' ) 
1618    import  matplotlib .pyplot  as  plt 
1719    for  fname  in  glob .glob ('*.py' ):
1820        if  fname .split ('/' )[- 1 ] ==  __file__ .split ('/' )[- 1 ]: continue 
@@ -26,9 +28,9 @@ def figs():
2628                break 
2729
2830        if  all_exists :
29-             print   '    already have %s' % fname 
31+             print ( '    already have %s' % fname ) 
3032        else :
31-             print   '    building %s' % fname 
33+             print ( '    building %s' % fname ) 
3234            plt .close ('all' )    # we need to clear between runs 
3335            mplshell .magic_run (basename )
3436            for  imagefile , dpi  in  imagefiles .iteritems ():
@@ -37,7 +39,7 @@ def figs():
3739                # iles preventing them from getting built successfully 
3840                # later 
3941                plt .savefig (imagefile , dpi = dpi )
40-     print   'all figures made' 
42+     print ( 'all figures made' ) 
4143
4244
4345def  clean ():
@@ -46,7 +48,7 @@ def clean():
4648    for  pattern  in  patterns :
4749        for  fname  in  glob .glob (pattern ):
4850            os .remove (fname )
49-     print   'all clean' 
51+     print ( 'all clean' ) 
5052
5153
5254
Original file line number Diff line number Diff line change 11""" 
22generate the rst files for the examples by iterating over the pylab examples 
33""" 
4+ from  __future__ import  print_function 
45import  os , glob 
56
67import  os 
@@ -152,7 +153,7 @@ def generate_example_rst(app):
152153
153154    fhindex .close ()
154155
155-     print 
156+     print () 
156157
157158def  setup (app ):
158159    app .connect ('builder-inited' , generate_example_rst )
Original file line number Diff line number Diff line change 1+ from  __future__ import  print_function 
12symbols  =  [
23    ["Lower-case Greek" ,
34     5 ,
@@ -141,7 +142,7 @@ def setup(app):
141142    # Do some verification of the tables 
142143    from  matplotlib  import  _mathtext_data 
143144
144-     print   "SYMBOLS NOT IN STIX:" 
145+     print ( "SYMBOLS NOT IN STIX:" ) 
145146    all_symbols  =  {}
146147    for  category , columns , syms  in  symbols :
147148        if  category  ==  "Standard Function Names" :
@@ -151,9 +152,9 @@ def setup(app):
151152            if  len (sym ) >  1 :
152153                all_symbols [sym [1 :]] =  None 
153154                if  sym [1 :] not  in _mathtext_data .tex2uni :
154-                     print   sym 
155+                     print ( sym ) 
155156
156-     print   "SYMBOLS NOT IN TABLE:" 
157+     print ( "SYMBOLS NOT IN TABLE:" ) 
157158    for  sym  in  _mathtext_data .tex2uni :
158159        if  sym  not  in all_symbols :
159-             print   sym 
160+             print ( sym ) 
Original file line number Diff line number Diff line change 1+ from  __future__ import  print_function 
12""" 
23autogenerate some tables for pylab namespace 
34""" 
1415    doc  =  getattr (o , '__doc__' , None )
1516    if  doc  is  not None :
1617        doc  =  ' - ' .join ([line  for  line  in  doc .split ('\n ' ) if  line .strip ()][:2 ])
17-          
18+ 
1819    mod  =  getattr (o , '__module__' , None )
1920    if  mod  is  None :
2021        mod  =  'unknown' 
2526                k  =  ':class:`~%s.%s`' % (mod , k )
2627            else :
2728                k  =  ':func:`~%s.%s`' % (mod , k )
28-             mod  =  ':mod:`%s`' % mod              
29+             mod  =  ':mod:`%s`' % mod 
2930        elif  mod .startswith ('numpy' ):
3031            #k = '`%s <%s>`_'%(k, 'http://scipy.org/Numpy_Example_List_With_Doc#%s'%k) 
3132            k  =  '`%s <%s>`_' % (k , 'http://sd-2116.dedibox.fr/pydocweb/doc/%s.%s' % (mod , k ))
4041mods .sort ()
4142for  mod  in  mods :
4243    border  =  '*' * len (mod )
43-     print   mod 
44-     print   border 
44+     print ( mod ) 
45+     print ( border ) 
4546
46-     print 
47+     print () 
4748    funcs , docs  =  zip (* modd [mod ])
4849    maxfunc  =  max ([len (f ) for  f  in  funcs ])
4950    maxdoc  =  max (40 , max ([len (d ) for  d  in  docs ]) )
5051    border  =  ' ' .join (['=' * maxfunc , '=' * maxdoc ])
51-     print   border 
52-     print   ' ' .join (['symbol' .ljust (maxfunc ), 'description' .ljust (maxdoc )])
53-     print   border 
52+     print ( border ) 
53+     print ( ' ' .join (['symbol' .ljust (maxfunc ), 'description' .ljust (maxdoc )]) )
54+     print ( border ) 
5455    for  func , doc  in  modd [mod ]:
5556        row  =  ' ' .join ([func .ljust (maxfunc ), doc .ljust (maxfunc )])
56-         print   row 
57+         print ( row ) 
5758
58-     print   border 
59-     print 
59+     print ( border ) 
60+     print () 
6061    #break 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments