[Baypiggies] configuration parser using python modules?

Nam Nguyen bitsink at gmail.com
Fri Jul 13 20:18:38 CEST 2012


I believe user experience is the major reason why Python module is
usually not the recommended configuration mechanism. Regular users
just don't want to deal with code if they can do away in some other
form. INI, for example, is easy enough, and better organized then
plain Python code.
Nam


On Fri, Jul 13, 2012 at 9:26 AM, Aleksandr Miroslav
<alexmiroslav at gmail.com> wrote:
> This may be obvious to people, but not to me, so I have to ask.
>
> Instead of using ConfigurationParser, why not have a configuration file
> be imported as a module, so this way, the variables could be part of the
> module's namespace.
>
> I know people have mentioned users running arbitrary code as a reason
> for why this should not be done, aside from this, is there any other
> reason? Is there a way to prevent users from running arbitrary code?
> _______________________________________________
> Baypiggies mailing list
> Baypiggies at python.org
> To change your subscription options or unsubscribe:
> http://mail.python.org/mailman/listinfo/baypiggies


More information about the Baypiggies mailing list