CMS 3D CMS Logo

helper.py
Go to the documentation of this file.
1 # taken from
2 """
3 http://wiki.python.org/moin/ConfigParserExamples
4 http://stackoverflow.com/questions/3220670/read-all-the-contents-in-ini-file-into-dictionary-with-python
5 """
6 from __future__ import print_function
7 
8 import ConfigParser as cp
9 
10 Config=cp.ConfigParser()
11 
12 def ConfigSectionMap(section):
13  dict1 = {}
14  options = Config.options(section)
15  for option in options:
16  try:
17  dict1[option] = Config.get(section, option)
18  if dict1[option] == -1:
19  DebugPrint("skip: %s" % option)
20  except:
21  print("exception on %s!" % option)
22  dict1[option] = None
23  return dict1
def ConfigSectionMap(section)
Definition: helper.py:12
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66