set -eu
-exec python -i -c '
+exec python3 -i -c '
# Math functions.
from math import *
# Convert number to scientific notation (e.g. 5e6).
def s(x):
- print "%e" % x
+ print("%e" % x)
# Time/Date functions.
# 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