[Distutils] Access to Python config info

Andrew M. Kuchling akuchlin@cnri.reston.va.us
Wed, 16 Dec 1998 09:13:16 -0500 (EST)


Greg Ward writes:
>On the superficial front, Marc-Andre hasn't convinced me that sysconfig
>is a better name than sys.config.  (On the other hand, I never said
>whether I thought it should be a sub-module of sys, or a [potentially
>ambiguous] module under a package called 'sys'.)  My rationale for

	A lot of Python programs import sys, more than will need
sys.config, so there seems no reason to force all those programs to
import another .py file that they're aren't going to actually use.  On
the other hand, if the config information winds up stored in the
Python binary, then sys.config will just add a few dictionary entries, 
so it might as well be there.  Alternatively, sys.config could be some 
sort of magic object that only imports the .py if it's actually
accessed, but that's an ugly hack.

	I'd sum it up as: if it goes in the Python binary, sys.config
is OK.  If it goes in an external .py file, sys.config is not OK, and
I'd vote for sysconfig or some new package.

>I'm torn on this one.  Building into Python prevents version skew,
>keeping it separate means it's easily readable without writing code.
>Both are compelling arguments.  Greg has given one voice in favour of a
>separate .py file... anyone else?

	Go for the .py file, IMHO.

-- 
A.M. Kuchling			http://starship.skyport.net/crew/amk/
The age of chivalry is gone. That of sophisters, economists and calculators
has succeeded: and the glory of Europe is extinguished for ever.
    -- Edmund Burke, _Reflections on The Revolution in France_