Modify examples to be both Python 2 and 3 compatible

For removing dependency on 2to3
This commit is contained in:
William S Fulton 2020-08-15 16:46:01 +01:00
commit 89bee6a7fa
37 changed files with 368 additions and 388 deletions

View file

@ -5,14 +5,14 @@ import subprocess
import sys
testname = os.path.basename(os.path.dirname(os.path.abspath(__file__)))
print "Testing " + testname + " - namespace packages"
print("Testing " + testname + " - namespace packages")
if sys.version_info < (3, 3, 0):
print " Not importing nstest as Python version is < 3.3"
print(" Not importing nstest as Python version is < 3.3")
sys.exit(0)
import nstest
print " Finished importing nstest"
print(" Finished importing nstest")
nstest.main()