summaryrefslogtreecommitdiff
path: root/tools/average
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2023-12-04 12:23:56 +0100
committerAlexis Hildebrandt <afh@surryhill.net>2023-12-04 12:23:56 +0100
commit3d22ddc7e67a06d0bdf2994b1ef018bc46e92f34 (patch)
tree287e867ef25bf2ecbaa9364f257aefdfb23ef97f /tools/average
parent8bbd3fed06087243861a6d6ec9c58dd8858ab34c (diff)
downloadfork-ledger-3d22ddc7e67a06d0bdf2994b1ef018bc46e92f34.tar.gz
fork-ledger-3d22ddc7e67a06d0bdf2994b1ef018bc46e92f34.tar.bz2
fork-ledger-3d22ddc7e67a06d0bdf2994b1ef018bc46e92f34.zip
Migrate Python scripts to Python 3
Diffstat (limited to 'tools/average')
-rwxr-xr-xtools/average6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/average b/tools/average
index 0e95c1c5..4c1e4b43 100755
--- a/tools/average
+++ b/tools/average
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
import getopt
import time
@@ -18,9 +18,9 @@ length = 0.0
i = 0
while i < count:
begin = time.time()
- cmd = '"' + string.join(args, '" "') + '"';
+ cmd = '"' + '" "'.join(args) + '"';
os.system(cmd)
length += time.time() - begin
i += 1
-print >> sys.stderr, length / count
+print(length / count, file=sys.stderr)