FWIW, I run Perl Template Toolkit (<a href="http://template-toolkit.org/">http://template-toolkit.org/</a>) to generate my supervisord.conf so I can do any kind of variable definition/substitution.<br><br><div class="gmail_quote">
On Thu, Oct 22, 2009 at 9:46 AM, Tres Seaver <span dir="ltr"><<a href="mailto:tseaver@palladion.com">tseaver@palladion.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<div class="im"><br>
Phillip Oldham wrote:<br>
> Not sure if this is the right place to post feature requests (the plope<br>
> collector seems to still have outstanding tickets from 2006).<br>
><br>
> It would be really handy if it were possible to define custom variables<br>
> for use in the config files. For instance:<br>
><br>
> [environment]<br>
> basepath=/var/www<br>
> project1=/mysite<br>
> project2=/othersite<br>
><br>
> [program:mysite_wsgi]<br>
> directory=%(basepath)s%(project1)s<br>
><br>
> [program:othersite_wsgi]<br>
> directory=%(basepath)s%(project2)s<br>
><br>
> [program:randomsite_wsgi]<br>
> directory=%(basepath)s/random<br>
<br>
</div>supervisor/options.py defines an 'UnhosedConfigParser' which derives<br>
from the 'RawConfigParser' in the stdlib 'ConfigParser' module, and<br>
therefore omits any of the variable expansion code. If it derived from<br>
'ConfigParser' instead, then you could get what you want by adding a<br>
'[DEFAULTS]' section to your config file. I'm assuming, from its name,<br>
that the choice to use RawConfigParser was deliberate.<br>
<br>
<br>
Tres.<br>
- --<br>
===================================================================<br>
Tres Seaver +1 540-429-0999 <a href="mailto:tseaver@palladion.com">tseaver@palladion.com</a><br>
Palladion Software "Excellence by Design" <a href="http://palladion.com" target="_blank">http://palladion.com</a><br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.9 (GNU/Linux)<br>
Comment: Using GnuPG with Mozilla - <a href="http://enigmail.mozdev.org" target="_blank">http://enigmail.mozdev.org</a><br>
<br>
iEYEARECAAYFAkrgjHgACgkQ+gerLs4ltQ5YZgCfZEtLxGtxOxh331e17Y6OP3ty<br>
w9wAoMcVKvuraynHqSnUUZulRsTO6XTj<br>
=lS9M<br>
-----END PGP SIGNATURE-----<br>
<div><div></div><div class="h5">_______________________________________________<br>
Supervisor-users mailing list<br>
<a href="mailto:Supervisor-users@lists.supervisord.org">Supervisor-users@lists.supervisord.org</a><br>
<a href="http://lists.supervisord.org/mailman/listinfo/supervisor-users" target="_blank">http://lists.supervisord.org/mailman/listinfo/supervisor-users</a><br>
</div></div></blockquote></div><br>