Brad Clements wrote: > I have a paste deploy config: file that uses interpolation, ie > > [server:main] > host=%(http_host)s > > However I want the [DEFAULT] values to be stored in a different file that I > also > use to set non-paste-deploy config data in. > > I create a dict from this other file and pass it as global_conf to loadserver. > > But interpolation fails, because ConfigParser doesn't pass global_conf as > defaults > to NicerConfigParser. > > Looking at how ConfigParser reloads global_conf defaults back from std > library > ConfigParser defaults, I think it's reasonable to set the std library > ConfigParser's > defaults based on global_conf passed in from the loadwsgi consumer > > However global_conf isn't available in ConfigParser.__init__, so I'm not sure > how > this should be refactored. > > Anyway, the use case is, I want to use loadwsgi methods, but pass in > global_conf > dict that can be used by interpolation of sections within the config: file
I've added this to Paste Deploy in r5917. Note that you can't overwrite variables already in [DEFAULT], you can only add more variables. I've also changed paster serve so you can add variable assignments, like "paster serve config.ini http_host=foo". -- Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org _______________________________________________ Paste-users mailing list [email protected] http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users
