1 from configparser import ConfigParser
4 DBFN = "/var/lib/gps303/gps303.sqlite"
7 config = ConfigParser()
13 #_print_config(config)
14 #print("now reading", fname)
16 #_print_config(config)
19 def _print_config(conf):
20 for section in conf.sections():
21 print("section", section)
22 for option in conf.options(section):
23 print(" ", option, conf[section][option])
25 if __name__ == "__main__":
27 conf = readconfig(argv[1])
29 print("binaryswitch", int(conf.get("device", "binaryswitch"), 0))