Skip to content

Commit

Permalink
print statements are now functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodore Lindsay authored and Theodore Lindsay committed Jul 13, 2017
1 parent 74ce94f commit 01e2cec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion figurefirst/mpl_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# It will be loaded instead.
try:
figurefirst_user_parameters = os.environ['figurefirst_user_parameters']
print 'Using FigureFirst parameters loaded from: ', figurefirst_user_parameters
print('Using FigureFirst parameters loaded from: '+ figurefirst_user_parameters)
except:
figurefirst_user_parameters = 'default'

Expand Down
14 changes: 7 additions & 7 deletions figurefirst/svg_to_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import os
try:
figurefirst_user_parameters = os.environ['figurefirst_user_parameters']
print 'Using FigureFirst parameters loaded from: ', figurefirst_user_parameters
print('Using FigureFirst parameters loaded from: '+ figurefirst_user_parameters)
except:
figurefirst_user_parameters = 'default'

Expand Down Expand Up @@ -943,7 +943,7 @@ def get_target_layer(fflayername):
gr.setAttribute('id', fig.get_gid())
ax_ids = [ax.get_gid() for ax in fig.get_axes() if ax.get_gid() is not None]
if len(ax_ids) > 0:
print 'unable to pass axes gid to svg'
print('unable to pass axes gid to svg')

if save_traceback:
tb = traceback.extract_stack()
Expand Down Expand Up @@ -973,7 +973,7 @@ def insert_figures(self, fflayername='mpl_layer'):
if fig.ismplfigure:
self.append_figure_to_layer(fig, fflayername)
else:
print fig.__dict__
print(fig.__dict__)

def apply_mpl_methods(self):
""" apply valid mpl methods to figure"""
Expand All @@ -988,7 +988,7 @@ def apply_mpl_methods(self):
#print "ax."+potential_method+"("+value+")"
#getattr(ax, potential_method)(eval(value))
except AttributeError:
print potential_method, 'is unknown method for mpl axes'
print(potential_method, 'is unknown method for mpl axes')

def apply_svg_attrs(self, svg_items_to_update='all'):
"""applies attributes to svgitems eg. lw stroke ect... need to call
Expand Down Expand Up @@ -1028,9 +1028,9 @@ def pass_xml(self, gid, key, value):
if gr.getAttribute('id') == gid:
elist.append(gr)
if len(elist) > 1:
print len(elist), 'groups with mataching ID found'
print(len(elist), 'groups with mataching ID found')
elif len(elist) == 0:
print 'ID not found'
print('ID not found')
for el in elist:
el.setAttribute(key, value)

Expand Down Expand Up @@ -1093,7 +1093,7 @@ def clear_fflayer(self, fflayername):
for child in children:
if 1:
if child.nodeName != 'figurefirst:targetlayer':
print 'Removing node: ', child.nodeName
print('Removing node: '+ child.nodeName)
target_layer.removeChild(child)
removed_children += 1
else:
Expand Down

0 comments on commit 01e2cec

Please sign in to comment.