src/figures/cantilever-data/get_v_dep.sh: print -> print()
authorW. Trevor King <wking@tremily.us>
Wed, 17 Apr 2013 21:57:56 +0000 (17:57 -0400)
committerW. Trevor King <wking@tremily.us>
Wed, 17 Apr 2013 21:57:56 +0000 (17:57 -0400)
Fix embedded Python syntax to avoid:

  cd .. && ./get_v_dep.sh
    File "<string>", line 1
      print '%.2f' % 131.97793902439034
                 ^
  SyntaxError: invalid syntax

src/figures/cantilever-data/get_v_dep.sh

index e2153eceb87392842117076ecfdb6da1cd89df11..bf8972fc648d5a96ac2c77b39a7989c840589b26 100755 (executable)
@@ -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"