I am using starpy to manage an asterisk server. According to the documentation, the easiest way to configure the connection to asterisk is by using a file called ./starpy.conf or ~/.starpy.conf, and initialize the application like this:
APPLICATION = utilapplication.UtilApplication()
The file names are, as far as I can see, not configurable. This works fine when you only have one possible configuration, but as soon as you want to interface to asterisk using different configuration parameters, the only way to do that is to put every program in a different directory. And if you are having several applications in one program, that is not even possible.
Is there any way of specifying the configuration file during the construction phase?
simple inherit from UtilApplication, set config files in init and call parent’s constructor.