7676
7777ext_modules = []
7878
79- for line in file ('lib/matplotlib/__init__.py' ).readlines ():
79+ for line in open ('lib/matplotlib/__init__.py' ).readlines ():
8080 if (line .startswith ('__version__' )):
8181 exec (line .strip ())
8282
@@ -235,7 +235,7 @@ def add_dateutil():
235235 # only add them if we need them
236236 if provide_pytz :
237237 add_pytz ()
238- print ' adding pytz'
238+ print_raw ( " adding pytz" )
239239 if provide_dateutil : add_dateutil ()
240240
241241print_raw ("" )
@@ -251,14 +251,14 @@ def add_dateutil():
251251
252252# Write the default matplotlibrc file
253253if options ['backend' ]: rc ['backend' ] = options ['backend' ]
254- template = file ('matplotlibrc.template' ).read ()
255- file ('lib/matplotlib/mpl-data/matplotlibrc' , 'w' ).write (template % rc )
254+ template = open ('matplotlibrc.template' ).read ()
255+ open ('lib/matplotlib/mpl-data/matplotlibrc' , 'w' ).write (template % rc )
256256
257257# Write the default matplotlib.conf file
258- template = file ('lib/matplotlib/mpl-data/matplotlib.conf.template' ).read ()
258+ template = open ('lib/matplotlib/mpl-data/matplotlib.conf.template' ).read ()
259259template = template .replace ("datapath = " , "#datapath = " )
260260template = template .replace (" use = 'Agg'" , " use = '%s'" % rc ['backend' ])
261- file ('lib/matplotlib/mpl-data/matplotlib.conf' , 'w' ).write (template )
261+ open ('lib/matplotlib/mpl-data/matplotlib.conf' , 'w' ).write (template )
262262
263263try : additional_params # has setupegg.py provided
264264except NameError : additional_params = {}
@@ -267,8 +267,8 @@ def add_dateutil():
267267 if options ['verbose' ]:
268268 mod .extra_compile_args .append ('-DVERBOSE' )
269269
270- print ' pymods' , py_modules
271- print ' packages' , packages
270+ print_raw ( " pymods %s" % py_modules )
271+ print_raw ( " packages %s" % packages )
272272distrib = setup (name = "matplotlib" ,
273273 version = __version__ ,
274274 description = "Python plotting package" ,
0 commit comments