Skip to content

Commit a32eb4e

Browse files
committed
More miscellaneous print_function updates.
1 parent 97d7daf commit a32eb4e

33 files changed

+116
-74
lines changed

release/win32/data/setupwin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from __future__ import print_function
12
from distutils import cygwinccompiler
23

34
try:

release/win32/data/setupwinegg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from __future__ import print_function
12
from distutils import cygwinccompiler
23

34
try:

test/_buildbot_install.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""This script will install matplotlib to a virtual environment to
22
faciltate testing."""
3+
from __future__ import print_function
34
import shutil, os, sys
45
from subprocess import Popen, PIPE, STDOUT
56
from optparse import OptionParser

test/_buildbot_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This script will test matplotlib in a virtual environment"""
2+
from __future__ import print_function
23
import os, glob
34

45
from _buildbot_util import check_call

test/_buildbot_test_postmortem.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
55
This is meant to be run from the mplroot directory."""
66

7+
from __future__ import print_function
78
import os, shutil
89

910
roots = ['test_matplotlib','test_plots']
@@ -91,8 +92,8 @@ def path_split_all(fname):
9192
continue
9293
if not os.path.exists(expected_fname):
9394
continue
94-
print fname
95-
print absdiff_fname
95+
print(fname)
96+
print(absdiff_fname)
9697

9798
teststr = os.path.splitext(fname)[0]
9899
this_targetdir = os.path.join(target_dir,teststr)

test/_buildbot_util.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Module to help _buildbot_*.py scripts."""
22

3+
from __future__ import print_function
34
import shutil, os, sys
45
from subprocess import Popen, PIPE, STDOUT
56

unit/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from __future__ import print_function

unit/agg_memleak.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
And another broken test...
33
"""
44

5+
from __future__ import print_function
56
import sys, time, os
67
from matplotlib.ft2font import FT2Font
78
from numpy.random import rand
@@ -11,7 +12,7 @@
1112
def report_memory(i):
1213
pid = os.getpid()
1314
a2 = os.popen('ps -p %d -o rss,sz' % pid).readlines()
14-
print i, ' ', a2[1],
15+
print(i, ' ', a2[1], end='')
1516
return int(a2[1].split()[0])
1617

1718
fname = '/usr/local/share/matplotlib/Vera.ttf'
@@ -52,7 +53,7 @@ def report_memory(i):
5253
if i==1: start = val
5354

5455
end = val
55-
print 'Average memory consumed per loop: %1.4f\n' % ((end-start)/float(N))
56+
print('Average memory consumed per loop: %1.4f\n' % ((end-start)/float(N)))
5657

5758
# w/o text and w/o write_png: Average memory consumed per loop: 0.02
5859
# w/o text and w/ write_png : Average memory consumed per loop: 0.3400

unit/auto_legend.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from __future__ import print_function
12
from pylab import *
23
import sys
34

unit/cbook_unit.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from __future__ import print_function
12
import unittest
23
from datetime import datetime
34

0 commit comments

Comments
 (0)