Make terrain2wiki.py compatible with python3...

...(Doesn't break python2 obviously). This might be usefull for Linux
distribs that come with python3 by default.
This commit is contained in:
Thibault Févry 2011-03-21 22:32:18 +00:00
parent ec557cdb39
commit 9a13492bcc

View file

@ -13,7 +13,7 @@ import re
try:
import argparse
except ImportError:
print 'Please install argparse by running "easy_install argparse"'
print('Please install argparse by running "easy_install argparse"')
sys.exit(1)
@ -85,7 +85,7 @@ dest='output_path', help="The location of the ouput file.")
output_path = args.output_path
if not os.path.exists(path) and not path.endswith('.cfg'):
print "Invalid path: '%s' does not exist" % path
print("Invalid path: '%s' does not exist") % path
sys.exit(1)
with open(path, "r") as input_file: