From: W. Trevor King Date: Wed, 17 Apr 2013 23:29:46 +0000 (-0400) Subject: src/figures/cantilever-data/make_v_dep_plots.sh: print -> print() X-Git-Tag: v1.0~293 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1a13ed3907d22171fdd0a609631cdb601c91e37c;p=thesis.git src/figures/cantilever-data/make_v_dep_plots.sh: print -> print() Fix embedded Python syntax to avoid: ./make_v_dep_plots.sh File "", line 1 print '%.2f' % 131.97793902439034 ^ SyntaxError: invalid syntax --- diff --git a/src/figures/cantilever-data/make_v_dep_plots.sh b/src/figures/cantilever-data/make_v_dep_plots.sh index 23eff4b..ebc4702 100755 --- a/src/figures/cantilever-data/make_v_dep_plots.sh +++ b/src/figures/cantilever-data/make_v_dep_plots.sh @@ -12,7 +12,7 @@ GPPLOTS="" while read LINE do Kprecise=`echo "$LINE" | sed 's/.*= \([0-9.]*\) +.*/\1/'` - K=`python -c "print '%.2f' % $Kprecise"` + K=`python -c "print('{:.2f}'.format($Kprecise))"` FILE="v-dep.d/v_dep_$K" Kindex=`echo "$LINE" | sed 's/K(\([0-9.]*\)) =.*/\1/'` case "$Kindex" in