-
Notifications
You must be signed in to change notification settings - Fork 0
/
getconfig.cfg
81 lines (69 loc) · 2.45 KB
/
getconfig.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
; https://docs.python.org/2/library/configparser.html
; https://docs.python.org/3/library/configparser.html
; From: https://docs.python.org/3/library/configparser.html#supported-ini-file-structure
;
; A configuration file consists of sections, each led by a [section] header,
; followed by key/value entries separated by a specific string
; (= or : by default).
; By default, section names are case sensitive but keys are not. Leading and
; trailing whitespace is removed from keys and values. Values can be omitted,
; in which case the key/value delimiter may also be left out. Values can also
; span multiple lines, as long as they are indented deeper than the first line
; of the value. Depending on the parser’s # mode, blank lines may be treated
; as parts of multiline values or ignored.
;
; Configuration files may include comments, prefixed by specific characters
; (# and ; by default). Comments may appear on their own on an otherwise
; empty line, possibly indented.
;
; [SECTION]
; key = value
;
# see also
# https://docs.python.org/2/library/fileformats.html
# Python 3 docs are better
# https://docs.python.org/3/library/fileformats.html
# See
# https://docs.python.org/3/library/configparser.html#supported-ini-file-structure
# On top of the core functionality, ConfigParser supports interpolation.
# This means values can be preprocessed before returning them from get() calls.
# Example
# [Paths]
# home_dir: /Users
# my_dir: %(home_dir)s/lumberjack
# my_pictures: %(my_dir)s/Pictures
#
# with class configparser.ExtendedInterpolation which can interpolate
# values from other sections as well:
# e.g.
# [Paths]
# home_dir: /Users
# my_dir: ${home_dir}/lumberjack
# my_pictures: ${my_dir}/Pictures
# python_dir: ${Frameworks:path}/Python/Versions/${Frameworks:Python}
# where Frameworks is a [Section] and path and Python are keys
[My Section]
foodir: %(dir)s/whatever
dir=frob
long: this value continues
in the next line
[Paths]
home_dir: /Users
my_dir: %(home_dir)s/lumberjack
my_pictures: %(my_dir)s/Pictures
[Common]
home_dir: /Users
library_dir: /Library
system_dir: /System
macports_dir: /opt/local
; with class configparser.ExtendedInterpolation which can interpolate
; values from other sections as well:
[Frameworks]
Python: 3.2
path: ${Common:system_dir}/Library/Frameworks/
[Arthur]
nickname: Two Sheds
last_name: Jackson
my_dir: ${Common:home_dir}/twosheds
my_pictures: ${my_dir}/Pictures
python_dir: ${Frameworks:path}/Python/Versions/${Frameworks:Python}