Mercurial > kallithea
annotate rhodecode/bin/rhodecode_config.py @ 4115:8b7294a804a0 rhodecode-2.2.5-gpl
Update CONTRIBUTORS with new contributors from RhodeCode v2.2.5
author | Bradley M. Kuhn <bkuhn@sfconservancy.org> |
---|---|
date | Wed, 02 Jul 2014 19:03:10 -0400 |
parents | 4959e22af6ca |
children | ffd45b185016 |
rev | line source |
---|---|
4011
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
1 """ |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
2 config generator |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
3 |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
4 """ |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
5 from __future__ import with_statement |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
6 import os |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
7 import sys |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
8 import uuid |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
9 import argparse |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
10 from mako.template import Template |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
11 TMPL = 'template.ini.mako' |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
12 here = os.path.dirname(os.path.abspath(__file__)) |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
13 |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
14 def argparser(argv): |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
15 usage = ( |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
16 "rhodecode-config [-h] [--filename=FILENAME] [--template=TEMPLATE] \n" |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
17 "VARS optional specify extra template variable that will be available in " |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
18 "template. Use comma separated key=val format eg.\n" |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
19 "key1=val1,port=5000,host=127.0.0.1,elements='a\,b\,c'\n" |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
20 ) |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
21 |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
22 parser = argparse.ArgumentParser( |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
23 description='RhodeCode CONFIG generator with variable replacement', |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
24 usage=usage |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
25 ) |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
26 |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
27 ## config |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
28 group = parser.add_argument_group('CONFIG') |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
29 group.add_argument('--filename', help='Output ini filename.') |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
30 group.add_argument('--template', help='Mako template file to use instead of ' |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
31 'the default builtin template') |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
32 group.add_argument('--raw', help='Store given mako template as raw without ' |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
33 'parsing. Use this to create custom template ' |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
34 'initially', action='store_true') |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
35 group.add_argument('--show-defaults', help='Show all default variables for ' |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
36 'builtin template', action='store_true') |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
37 args, other = parser.parse_known_args() |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
38 return parser, args, other |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
39 |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
40 |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
41 def _escape_split(text, sep): |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
42 """ |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
43 Allows for escaping of the separator: e.g. arg='foo\, bar' |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
44 |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
45 It should be noted that the way bash et. al. do command line parsing, those |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
46 single quotes are required. a shameless ripoff from fabric project. |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
47 |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
48 """ |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
49 escaped_sep = r'\%s' % sep |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
50 |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
51 if escaped_sep not in text: |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
52 return text.split(sep) |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
53 |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
54 before, _, after = text.partition(escaped_sep) |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
55 startlist = before.split(sep) # a regular split is fine here |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
56 unfinished = startlist[-1] |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
57 startlist = startlist[:-1] |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
58 |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
59 # recurse because there may be more escaped separators |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
60 endlist = _escape_split(after, sep) |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
61 |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
62 # finish building the escaped value. we use endlist[0] becaue the first |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
63 # part of the string sent in recursion is the rest of the escaped value. |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
64 unfinished += sep + endlist[0] |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
65 |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
66 return startlist + [unfinished] + endlist[1:] # put together all the parts |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
67 |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
68 def _run(argv): |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
69 parser, args, other = argparser(argv) |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
70 if not len(sys.argv) > 1: |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
71 print parser.print_help() |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
72 sys.exit(0) |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
73 # defaults that can be overwritten by arguments |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
74 tmpl_stored_args = { |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
75 'http_server': 'waitress', |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
76 'lang': 'en', |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
77 'database_engine': 'sqlite', |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
78 'host': '127.0.0.1', |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
79 'port': 5000, |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
80 'error_aggregation_service': None |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
81 } |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
82 if other: |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
83 # parse arguments, we assume only first is correct |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
84 kwargs = {} |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
85 for el in _escape_split(other[0], ','): |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
86 kv = _escape_split(el, '=') |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
87 if len(kv) == 2: |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
88 k, v = kv |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
89 kwargs[k] = v |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
90 # update our template stored args |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
91 tmpl_stored_args.update(kwargs) |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
92 |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
93 # use default that cannot be replaced |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
94 tmpl_stored_args.update({ |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
95 'uuid': lambda: uuid.uuid4().hex, |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
96 'here': os.path.abspath(os.curdir), |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
97 }) |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
98 if args.show_defaults: |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
99 for k,v in tmpl_stored_args.iteritems(): |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
100 print '%s=%s' % (k, v) |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
101 sys.exit(0) |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
102 try: |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
103 # built in template |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
104 tmpl_file = os.path.join(here, TMPL) |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
105 if args.template: |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
106 tmpl_file = args.template |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
107 |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
108 with open(tmpl_file, 'rb') as f: |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
109 tmpl_data = f.read() |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
110 if args.raw: |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
111 tmpl = tmpl_data |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
112 else: |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
113 tmpl = Template(tmpl_data).render(**tmpl_stored_args) |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
114 with open(args.filename, 'wb') as f: |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
115 f.write(tmpl) |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
116 print 'Wrote new config file in %s' % (os.path.abspath(args.filename)) |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
117 |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
118 except Exception: |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
119 from mako import exceptions |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
120 print exceptions.text_error_template().render() |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
121 |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
122 def main(argv=None): |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
123 """ |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
124 Main execution function for cli |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
125 |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
126 :param argv: |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
127 """ |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
128 if argv is None: |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
129 argv = sys.argv |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
130 |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
131 try: |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
132 return _run(argv) |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
133 except Exception: |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
134 raise |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
135 |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
136 |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
137 if __name__ == '__main__': |
4959e22af6ca
Added ini config maker with dynamic variable replacements.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
138 sys.exit(main(sys.argv)) |