Skip to content

Commit 3f0cdf0

Browse files
committed
survey_graphics: Fix graphics test suite for Py3 (print function)
1 parent 11641bc commit 3f0cdf0

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

survey_graphics/emit_sage_commands.sage

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ emitted_names = set()
77

88
def emit_tex_sage_command(name):
99
if name not in emitted_names:
10-
print >> sage_commands, '\\pgfkeyssetvalue{/sagefunc/' + name + '}{\\href{\\githubsearchurl?q=\\%22def+' + name.replace('\\', '\\\\') + '(\\%22}{\\sage{' + name.replace('_', '\\underscore{}') + '}}}%)'
10+
sage_commands.write(r'\pgfkeyssetvalue{/sagefunc/' + name + r'}{\href{\githubsearchurl?q=\%22def+' + name.replace('\\', r'\\') + '(\\%22}{\\sage{' + name.replace(r'_', r'\underscore{}') + '}}}%)' + '\n')
1111
emitted_names.add(name)
1212

1313

survey_graphics/graphics_for_extreme_notes.sage

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ emitted_names = set()
77

88
def emit_tex_sage_command(name):
99
if name not in emitted_names:
10-
print >> sage_commands, '\\pgfkeyssetvalue{/sagefunc/' + name + '}{\\href{\\githubsearchurl?q=\\%22def+' + name.replace('\\', '\\\\') + '(\\%22}{\\sage{' + name.replace('_', '\\underscore{}') + '}}}%)'
10+
sage_commands.write(r'\pgfkeyssetvalue{/sagefunc/' + name + r'}{\href{\githubsearchurl?q=\%22def+' + name.replace('\\', r'\\') + '(\\%22}{\\sage{' + name.replace(r'_', r'\underscore{}') + '}}}%)' + '\n')
1111
emitted_names.add(name)
1212

1313
compendium_figsize = 2.6

survey_graphics/graphics_for_survey.sage

+8-8
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ emitted_names = set()
77

88
def emit_tex_sage_command(name):
99
if name not in emitted_names:
10-
print >> sage_commands, '\\pgfkeyssetvalue{/sagefunc/' + name + '}{\\href{\\githubsearchurl?q=\\%22def+' + name.replace('\\', '\\\\') + '(\\%22}{\\sage{' + name.replace('_', '\\underscore{}') + '}}}%)'
10+
sage_commands.write(r'\pgfkeyssetvalue{/sagefunc/' + name + r'}{\href{\githubsearchurl?q=\%22def+' + name.replace('\\', r'\\') + '(\\%22}{\\sage{' + name.replace(r'_', r'\underscore{}') + '}}}%)' + '\n')
1111
emitted_names.add(name)
1212

1313
compendium_figsize = 2.6
@@ -113,7 +113,7 @@ def plot_something(h):
113113
return g
114114

115115
def procedure_graph(procedure_name, fn, g=None):
116-
print "##", procedure_name
116+
print("##", procedure_name)
117117
emit_tex_sage_command(procedure_name)
118118
plot_something(fn).save(destdir + "%s-from.pdf" % procedure_name, figsize=compendium_figsize)
119119
if g is None:
@@ -133,7 +133,7 @@ with open(destdir + "sage-commands.tex", "w") as sage_commands:
133133

134134
# Graph
135135

136-
print "## graphics_for_survey_poset"
136+
print("## graphics_for_survey_poset")
137137
load('survey_graphics/graphics_for_survey_poset.sage')
138138

139139
# override function!
@@ -151,7 +151,7 @@ with open(destdir + "sage-commands.tex", "w") as sage_commands:
151151
## Compendium tables
152152
for name in [ 'll_strong_fractional', 'hildebrand_2_sided_discont_1_slope_1', 'hildebrand_2_sided_discont_2_slope_1', 'hildebrand_discont_3_slope_1', 'dr_projected_sequential_merge_3_slope', 'chen_4_slope', 'gmic', 'gj_2_slope', 'gj_2_slope_repeat', 'dg_2_step_mir', 'kf_n_step_mir', 'gj_forward_3_slope', 'drlm_backward_3_slope', 'drlm_2_slope_limit', 'drlm_2_slope_limit_1_1', 'bhk_irrational', 'bccz_counterexample', 'drlm_3_slope_limit', 'dg_2_step_mir_limit', 'rlm_dpl1_extreme_3a', 'hildebrand_5_slope_22_1', 'hildebrand_5_slope_24_1', 'hildebrand_5_slope_28_1', 'kzh_7_slope_1', 'kzh_28_slope_1', 'bcdsp_arbitrary_slope', 'bcds_discontinuous_everywhere' ]:
153153
emit_tex_sage_command(name)
154-
print "##", name
154+
print("##", name)
155155
h = eval(name)()
156156
g = plot_something(h)
157157
g.save(destdir + "%s.pdf" % name, figsize=compendium_figsize)
@@ -192,15 +192,15 @@ with open(destdir + "sage-commands.tex", "w") as sage_commands:
192192
extremality_test(h, show_plots=destdir + "%s_%s-%%s.pdf" % (name, s))
193193

194194
# Bccz figure
195-
print "## BCCZ"
195+
print("## BCCZ")
196196
load("survey_graphics/graphics_for_survey_bccz.sage")
197197

198198
# Plot or re-plot some 2d diagrams with a different style
199199
igp.proj_plot_colors = ['grey', 'grey', 'grey']
200200
igp.ticks_keywords = survey_ticks_keywords
201201

202202
name = 'gmic'
203-
print "##", name
203+
print("##", name)
204204
h = eval(name)(2/3)
205205
g = plot_2d_diagram(h)
206206
f = find_f(h)
@@ -213,15 +213,15 @@ with open(destdir + "sage-commands.tex", "w") as sage_commands:
213213
igp.ticks_keywords = no_labels_ticks_keywords
214214

215215
for name in [ 'bhk_irrational', 'gj_forward_3_slope', 'not_minimal_2', 'not_extreme_1' ]:
216-
print "##", name
216+
print("##", name)
217217
emit_tex_sage_command(name)
218218
h = eval(name)()
219219
plot_2d_diagram(h, True).save(destdir + "%s-2d_diagram.pdf" % name, figsize=6) # figsize??
220220

221221
igp.ticks_keywords = c7_ticks_keywords
222222

223223
for name in [ 'drlm_not_extreme_1' ]:
224-
print "##", name
224+
print("##", name)
225225
emit_tex_sage_command(name)
226226
h = eval(name)()
227227
extremality_test(h, show_plots=destdir + "%s-%%s.pdf" % name)

0 commit comments

Comments
 (0)