Read an integer value from a configuration file code example
Example: Read an integer value from a configuration file
import ConfigParser
config = ConfigParser.ConfigParser()
config.read("integers.ini")
print config.get("Integers", "b")Output5
print type(config.get("Integers", "b"))Output
print config.getint("Integers", "b")Output5
print type(config.getint("Integers", "b"))Output
Input Filesintegers.ini