Skip to content

Commit

Permalink
Add argument for Python 3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
csvoss committed May 19, 2018
1 parent 7f6a35e commit 8a481b6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,14 +780,15 @@ def onelinerize(original):

if __name__ == '__main__':
usage = ['python main.py --help',
'python main.py [--debug] [infile.py [outfile.py]]',
'python main.py [--debug] [--python3] [infile.py [outfile.py]]',
]
parser = argparse.ArgumentParser(usage='\n '.join(usage),
description=("if infile is given and outfile is not, outfile will be "
"infile_ol.py"))
parser.add_argument('infile', nargs='?')
parser.add_argument('outfile', nargs='?')
parser.add_argument('--debug', action='store_true')
parser.add_argument('--debug', action='store_true', description='debug mode')
parser.add_argument('--python3', action='store_true', description='if infile.py is Python 3')
args = parser.parse_args()
original = None
if args.infile is None:
Expand Down

0 comments on commit 8a481b6

Please sign in to comment.