Mercurial > hg > martINI
changeset 21:85bbb83703fa
python3
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sat, 24 Apr 2021 14:58:56 -0700 |
parents | 93c198d9bf84 |
children | 112cb171b419 |
files | martini/main.py |
diffstat | 1 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/martini/main.py Tue Nov 24 14:49:30 2020 -0800 +++ b/martini/main.py Sat Apr 24 14:58:56 2021 -0700 @@ -95,8 +95,8 @@ # display usage information if not files: - print 'Usage:' - print usage % os.path.basename(sys.argv[0]) + print('Usage:') + print(usage % os.path.basename(sys.argv[0])) sys.exit(0) # process the files @@ -112,7 +112,7 @@ for option in options: value = munger.get(section, option) if value is not None: - print value + print(value) else: config.ConfigMunger({section: munger[section]}).write() @@ -127,8 +127,8 @@ # display usage information if not files: - print 'Usage:' - print usage % os.path.basename(sys.argv[0]) + print('Usage:') + print(usage % os.path.basename(sys.argv[0])) sys.exit(0) # process the files @@ -150,7 +150,7 @@ fp = sys.stdout else: fp.close() - fp = file(f, 'w') + fp = open(f, 'w') config.ConfigMunger(conf).write(fp) def munge(args=None): @@ -169,12 +169,12 @@ # display usage information if not files: - print 'Usage:' - print usage % os.path.basename(sys.argv[0]) + print('Usage:') + print(usage % os.path.basename(sys.argv[0])) sys.exit(0) # munge the files - conf = list(files) + conf = list(files) conf.append(sections) munger = config.ConfigMunger(*conf) if options.output: