Uggla 9739bfe06e Add server running port from configuration file.
Add a method to shutdown the server.
Refine some code.
2015-06-26 01:10:48 +02:00

19 lines
492 B
Python

# coding=utf-8
import ConfigParser
class AlexandriaConfiguration(object):
def __init__(self, configuration_file):
self.config = ConfigParser.ConfigParser(allow_no_value=True)
self.config.read(configuration_file)
def get_drivers(self):
return self.config.sections()
def get_driver_info(self,driver):
return self.config.options(driver)
def get_alexandria_port(self):
return self.config.get("alexandria", "port")