[Distutils] Access to Python config info
John Skaller
skaller@maxtal.com.au
Wed, 23 Dec 1998 01:57:33 +1000
At 01:40 23/12/98 +1000, John Skaller wrote:
Duh, sorry for replying to my own post again but:
>EXECUTIVE SUMMARY
>
> 1. module parse_configuration, function get_config
> returns a dictionary of config data parsed from
> the makefile
This depends on knowing where the makefile and
the config file are. Which suggest a further factorisation:
def parse_config_h(filename)
def parse_makefile(filename)
which would be generally useful! And truly statless.
Now, provide:
def get_config_h_filename()
def get_makefile_filename()
and we can wrap them up to get:
def get_config():
dict = parse_config_h(get_config_h_filename())
dict.update(parse_config_h(get_makefile_filename()))
return dict
Again, this factorisation simplifies the design, and also
creates added functionality.
-------------------------------------------------------
John Skaller email: skaller@maxtal.com.au
http://www.maxtal.com.au/~skaller
phone: 61-2-96600850
snail: 10/1 Toxteth Rd, Glebe NSW 2037, Australia