Re: [Mailman-Users] Can't run mm_cfg.py
On Thu, Jun 01, 2006 at 08:30:34AM -0700, Dragon wrote:
Yeah, that all seems a bit strange but if he can stop and successfully restart his qrunners, then the edits are syntactically correct and mailman can at least understand what is there. Whether those edits are then lexically and logically correct is another story altogether.
I actually did restart Mailman, with no errors, and so far it seems to have taken my changes. If mm_cfg is just there to be read from, why is it a script instead of a text file /etc/mailman?
Carl Fink carl@finknetwork.com "Patriotism is supporting your country all the time, and your government when it deserves it." - Mark Twain
At 12:14 PM -0400 2006-06-01, Carl Fink wrote:
I actually did restart Mailman, with no errors, and so far it seems to have taken my changes. If mm_cfg is just there to be read from, why is it a script instead of a text file /etc/mailman?
Because with a text /etc/mailman.cf configuration file, you then
have to write a program to parse that content and to deal with all possible exceptions.
When the configuration is done in the Python language in a Python
script, you can let Python do all the parsing, and do the equivalent of "#include" in order to pull in all your configuration details.
-- Brad Knowles, <brad@stop.mail-abuse.org>
"Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin (1706-1790), reply of the Pennsylvania
Assembly to the Governor, November 11, 1755
LOPSA member since December 2005. See <http://www.lopsa.org/>.
On Thu, Jun 01, 2006 at 11:18:04AM -0500, Brad Knowles wrote:
When the configuration is done in the Python language in a Python script, you can let Python do all the parsing, and do the equivalent of "#include" in order to pull in all your configuration details.
Fair enough. Like I wrote, I'm no Python expert.
Thanks.
Carl Fink carl@finknetwork.com "Patriotism is supporting your country all the time, and your government when it deserves it." - Mark Twain
On 6/1/06 9:30 AM, "Carl Fink" <carl@finknetwork.com> wrote:
On Thu, Jun 01, 2006 at 11:18:04AM -0500, Brad Knowles wrote:
When the configuration is done in the Python language in a Python script, you can let Python do all the parsing, and do the equivalent of "#include" in order to pull in all your configuration details.
Fair enough.
A downside is that there is no "proper" place for Defaults.py and mm_cfg.py
They are configuration, so they go into /etc somewhere. They are executable, so they DON'T go into /etc. Not a problem with the stock Mailman layout, but it does cause problems for one trying to match the file system standard (such as the Red Hat packaging of Mailman, which shotguns Mailman into several different places--and is well done).
--John
Carl Fink wrote:
On Thu, Jun 01, 2006 at 11:18:04AM -0500, Brad Knowles wrote:
When the configuration is done in the Python language in a Python script, you can let Python do all the parsing, and do the equivalent of "#include" in order to pull in all your configuration details.
Fair enough. Like I wrote, I'm no Python expert.
I am no Python expert either, but i am a competent perl and C++ programmer. After about 4 years of tweaking and changing Python code, I've learned to appreciate it's power, but also it's simplicity. Python is a very well designed programming language, Mailman is just one of many great apps that prove this.
-Jim P.
John W. Baxter wrote:
On 6/1/06 9:30 AM, "Carl Fink" <carl@finknetwork.com> wrote:
On Thu, Jun 01, 2006 at 11:18:04AM -0500, Brad Knowles wrote:
When the configuration is done in the Python language in a Python script, you can let Python do all the parsing, and do the equivalent of "#include" in order to pull in all your configuration details. Fair enough.
A downside is that there is no "proper" place for Defaults.py and mm_cfg.py
They are configuration, so they go into /etc somewhere. They are executable, so they DON'T go into /etc. Not a problem with the stock Mailman layout, but it does cause problems for one trying to match the file system standard (such as the Red Hat packaging of Mailman, which shotguns Mailman into several different places--and is well done).
I have custom Mailman installs (from source releases) on my systems. The way that I solve this problem, of desiring all configuration files to exist in /etc, is to hardlink /usr/local/mailman/Mailman/mm_cfg.py (and a few others) to a directory I created (/etc/mailman) on each system. I do the same for MoinMoin (a Python wiki). This way I can periodically backup etc and not have to worry about a large bloated backup of easily re-installed applications.
-Jim P.
In a flurry of recycled electrons, Jim Popovitch wrote:
I am no Python expert either, but i am a competent perl and C++ programmer. After about 4 years of tweaking and changing Python code, I've learned to appreciate it's power, but also it's simplicity. Python is a very well designed programming language, Mailman is just one of many great apps that prove this.
In general, I agree, but I question a language that relies on indent level for blocking and don't let you include blank lines for readability. I guess it's ok when you get used to it. But then again, I mostly work in tcl at this point... :-)
Of course, YMMV
z!
On 6/1/06 1:10 PM, "Carl Zwanzig" <cpz@tuunq.com> wrote:
In general, I agree, but I question a language that relies on indent level for blocking and don't let you include blank lines for readability. I guess it's ok when you get used to it. But then again, I mostly work in tcl at this point... :-)
Of course, YMMV
And if braces for structure move into Python as a required thing (unlikely, as long as the BDFL is around, and he's much younger than I am), I stop with the version upgrades.
The clearly visible structure was one of the first things that attracted me.
As you say, YMMV.
--John
Carl Zwanzig wrote:
In general, I agree, but I question a language that relies on indent level for blocking and don't let you include blank lines for readability. I guess it's ok when you get used to it.
The forced indentation is something there will probably never be even close to universal agreement on - some love it, some hate it, very few are neutral.
But why do you think you can't include blank lines?
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (6)
-
Brad Knowles -
Carl Fink -
cpz@tuunq.com -
Jim Popovitch -
John W. Baxter -
Mark Sapiro