diff --git a/qa/rpc-tests/p2p-acceptblock.py b/qa/rpc-tests/p2p-acceptblock.py index 8886fac21..d50198825 100755 --- a/qa/rpc-tests/p2p-acceptblock.py +++ b/qa/rpc-tests/p2p-acceptblock.py @@ -167,7 +167,7 @@ class AcceptBlockTest(BitcoinTestFramework): [ x.sync_with_ping() for x in [test_node, white_node] ] assert_equal(self.nodes[0].getblockcount(), 2) assert_equal(self.nodes[1].getblockcount(), 2) - print "First height 2 block accepted by both nodes" + print("First height 2 block accepted by both nodes") # 3. Send another block that builds on the original tip. blocks_h2f = [] # Blocks at height 2 that fork off the main chain diff --git a/qa/rpc-tests/script_test.py b/qa/rpc-tests/script_test.py index 2e5d277ae..495a3e9e0 100755 --- a/qa/rpc-tests/script_test.py +++ b/qa/rpc-tests/script_test.py @@ -81,7 +81,7 @@ def ParseScriptFlags(flag_string): if x in flag_map: flags |= flag_map[x] else: - print "Error: unrecognized script flag: ", x + print("Error: unrecognized script flag: ", x) return flags ''' diff --git a/qa/zcash/create_benchmark_archive.py b/qa/zcash/create_benchmark_archive.py index 84bd236de..93200ea6c 100644 --- a/qa/zcash/create_benchmark_archive.py +++ b/qa/zcash/create_benchmark_archive.py @@ -30,7 +30,7 @@ LD_LIBRARY_PATH=src/leveldb python qa/zcash/create_benchmark_archive.py def check_deps(): if subprocess.call(['which', 'find', 'xz', ZCASH_CLI], stdout=subprocess.PIPE): - print USAGE + print(USAGE) sys.exit() def encode_varint(n): diff --git a/qa/zcash/create_wallet_200k_utxos.py b/qa/zcash/create_wallet_200k_utxos.py index da54e7a3c..08c766e12 100755 --- a/qa/zcash/create_wallet_200k_utxos.py +++ b/qa/zcash/create_wallet_200k_utxos.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017 The Zcash developers # Distributed under the MIT software license, see the accompanying # file COPYING or https://www.opensource.org/licenses/mit-license.php . @@ -13,8 +13,6 @@ # - Archive the resulting /tmp/test###### directory # -import sys; assert sys.version_info < (3,), ur"This script does not run under Python 3. Please use Python 2.7.x." - from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( assert_equal, diff --git a/qa/zcash/test-depends-sources-mirror.py b/qa/zcash/test-depends-sources-mirror.py index 5f36a3d59..bf049c921 100755 --- a/qa/zcash/test-depends-sources-mirror.py +++ b/qa/zcash/test-depends-sources-mirror.py @@ -27,10 +27,10 @@ def get_depends_sources_list(): for filename in get_depends_sources_list(): resp = requests.head(MIRROR_URL_DIR + filename) - print "Checking [" + filename + "] ..." + print("Checking [" + filename + "] ...") if resp.status_code != 200: - print "FAIL. File not found on server: " + filename + print("FAIL. File not found on server: " + filename) sys.exit(1) expected_size = os.path.getsize(os.path.join(DEPENDS_SOURCES_DIR, filename)) diff --git a/zcutil/make-release.py b/zcutil/make-release.py index 45d0eca7a..3d89f3102 100755 --- a/zcutil/make-release.py +++ b/zcutil/make-release.py @@ -656,7 +656,7 @@ if __name__ == '__main__': actualargs = sys.argv sys.argv = [sys.argv[0], '--verbose'] - print '=== Self Test ===' + print('=== Self Test ===') try: unittest.main() except SystemExit as e: @@ -664,5 +664,5 @@ if __name__ == '__main__': raise sys.argv = actualargs - print '=== Running ===' + print('=== Running ===') main() diff --git a/zcutil/release-notes.py b/zcutil/release-notes.py index b1a262232..e4d58a2c0 100755 --- a/zcutil/release-notes.py +++ b/zcutil/release-notes.py @@ -76,7 +76,7 @@ def authors_in_release_notes(filename): ## Sums commits made by contributors in each Zcash release note in ./doc/release-notes and writes to authors.md def document_authors(): - print "Writing contributors documented in release-notes directory to authors.md." + print("Writing contributors documented in release-notes directory to authors.md.") authors_file = os.path.join(doc_dir, 'authors.md') with open(authors_file, 'w') as f: f.write('Zcash Contributors\n==================\n\n')