![]() |
The Gaudi Framework
v33r1 (b1225454)
|
Classes | |
| class | BootstrapHelper |
| class | gaudimain |
Functions | |
| def | getAllOpts (explicit_defaults=False) |
| def | toOpt (value) |
| def | parseOpt (s) |
Variables | |
| log = logging.getLogger(__name__) | |
| def Gaudi.Main.parseOpt | ( | s | ) |
Helper to parse option strings to Python values.
Ideally it should just be "eval", but the string parser of Gaudi
is different from the Python one, so we get string options that
cannot be just evaluated.
>>> print(parseOpt('123'))
123
>>> print(parseOpt('"some\\n\\\\"text\\\\""'))
some
"text"
>>> print(parseOpt(''))
<BLANKLINE>
(see gaudi/Gaudi#78)
Definition at line 252 of file Main.py.
| def Gaudi.Main.toOpt | ( | value | ) |
Helper to convert values to old .opts format.
>>> print(toOpt('some "text"'))
"some \\"text\\""
>>> print(toOpt('first\\nsecond'))
"first
second"
>>> print(toOpt({'a': [1, 2, '3']}))
{"a": [1, 2, "3"]}
Definition at line 229 of file Main.py.