From: W. Trevor King Date: Wed, 17 Apr 2013 21:57:56 +0000 (-0400) Subject: src/figures/cantilever-data/get_v_dep.sh: print -> print() X-Git-Tag: v1.0~294 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=240eefa47ddfaf86c49352e01dac745545eb98b7;p=thesis.git src/figures/cantilever-data/get_v_dep.sh: print -> print() Fix embedded Python syntax to avoid: cd .. && ./get_v_dep.sh File "", line 1 print '%.2f' % 131.97793902439034 ^ SyntaxError: invalid syntax --- diff --git a/src/figures/cantilever-data/get_v_dep.sh b/src/figures/cantilever-data/get_v_dep.sh index e2153ec..bf8972f 100755 --- a/src/figures/cantilever-data/get_v_dep.sh +++ b/src/figures/cantilever-data/get_v_dep.sh @@ -9,7 +9,7 @@ AVGFILE='./data/averaged-data' 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" echo "clearing $FILE" > "$FILE.dat"