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">&lt;<a href="mailto:tseaver@palladion.com">tseaver@palladion.com</a>&gt;</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>
&gt; Not sure if this is the right place to post feature requests (the plope<br>
&gt; collector seems to still have outstanding tickets from 2006).<br>
&gt;<br>
&gt; It would be really handy if it were possible to define custom variables<br>
&gt; for use in the config files. For instance:<br>
&gt;<br>
&gt; [environment]<br>
&gt; basepath=/var/www<br>
&gt; project1=/mysite<br>
&gt; project2=/othersite<br>
&gt;<br>
&gt; [program:mysite_wsgi]<br>
&gt; directory=%(basepath)s%(project1)s<br>
&gt;<br>
&gt; [program:othersite_wsgi]<br>
&gt; directory=%(basepath)s%(project2)s<br>
&gt;<br>
&gt; [program:randomsite_wsgi]<br>
&gt; directory=%(basepath)s/random<br>
<br>
</div>supervisor/options.py defines an &#39;UnhosedConfigParser&#39; which derives<br>
from the &#39;RawConfigParser&#39; in the stdlib &#39;ConfigParser&#39; module, and<br>
therefore omits any of the variable expansion code.  If it derived from<br>
&#39;ConfigParser&#39; instead, then you could get what you want by adding a<br>
&#39;[DEFAULTS]&#39; section to your config file.  I&#39;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   &quot;Excellence by Design&quot;    <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>