From c5b5704153f503f37d7b89aadc0d047c60db1b37 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 17 Jun 2018 08:22:20 +0200 Subject: [PATCH] shell/bin/calc: convert to python3 --- shell/bin/calc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shell/bin/calc b/shell/bin/calc index ea3cbd3..7980509 100755 --- a/shell/bin/calc +++ b/shell/bin/calc @@ -18,7 +18,7 @@ set -eu -exec python -i -c ' +exec python3 -i -c ' # Math functions. from math import * @@ -33,7 +33,7 @@ def binom(n,k): # Convert number to scientific notation (e.g. 5e6). def s(x): - print "%e" % x + print("%e" % x) # Time/Date functions. @@ -41,9 +41,9 @@ import time # Convert time in seconds since epoch to readable string. def stime(seconds): - print time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(seconds)) + print(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(seconds))) -print "Welcome to the ultimate calculator."' +print("Welcome to the ultimate calculator.")' # vim: ft=python -- 2.45.2