3 SCRIPTDIR
= os
.path
.dirname(__file__
)
5 ## Build initial help list
10 f
= open(os
.path
.join(SCRIPTDIR
, 'help.txt'))
15 if (line
.rfind('+\\') + 2) == len(line
):
16 multiline
+= line
[0:(len(line
) - 2)]
20 help_list
[title
].append(multiline
)
23 if line
== '' or line
.find('#') >= 0:
24 # skip blank or commented lines
26 if line
.find(':') <= 0:
30 value
= line
.split(':', 1)[0].strip()
31 data
= line
.split(':', 1)[1].strip()
32 if value
.lower() == 'available in':
33 # special setting to create section_known array
34 data
= data
.split(',')
36 section
= section
.lower().strip()
37 if section
not in settings_known
:
38 settings_known
[section
] = []
39 settings_known
[section
].append(title
)
41 if (line
.rfind('+\\') + 2) == len(line
):
42 multiline
+= line
[0:(len(line
) - 2)]
44 help_list
[title
].append(line
)
47 ## Done building help list
52 def getknown(section
):
53 return settings_known
[section
]