Mercurial > hg > martINI
comparison martini/main.py @ 12:4faed08eb8d8
py35
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Mon, 20 Feb 2017 14:34:18 -0800 |
parents | 13d85b455533 |
children | 85bbb83703fa |
comparison
equal
deleted
inserted
replaced
11:c77259f467a3 | 12:4faed08eb8d8 |
---|---|
55 return (files, ini) | 55 return (files, ini) |
56 | 56 |
57 def set(args=None): | 57 def set(args=None): |
58 | 58 |
59 usage = "%s file1 [file2] [...] --section1 option1=value1 option2=value2 --section2 option3=value3" | 59 usage = "%s file1 [file2] [...] --section1 option1=value1 option2=value2 --section2 option3=value3" |
60 | 60 |
61 # process arguments | 61 # process arguments |
62 if args is None: | 62 if args is None: |
63 args = sys.argv[1:] | 63 args = sys.argv[1:] |
64 files, sections = parse_options(*args) | 64 files, sections = parse_options(*args) |
65 | 65 |
66 # display usage information | 66 # display usage information |
67 if not files: | 67 if not files: |
68 print 'Usage:' | 68 print ('Usage:') |
69 print usage % os.path.basename(sys.argv[0]) | 69 print (usage % os.path.basename(sys.argv[0])) |
70 sys.exit(0) | 70 sys.exit(0) |
71 | 71 |
72 # process the files | 72 # process the files |
73 for f in files: | 73 for f in files: |
74 if f == '-': | 74 if f == '-': |