mailman mailing list program

C

Carol Carrot

Greetings.

I've never seen a more complicated, verbose pile of hogwash than the
"deliverd by mailman" mailing list program.

Still I have to use it.

I'm trying to get a header to get attached tot he email. it gets stripped
from the email, whwere as the footer comes in as an attachment.

all this is buried under "no0-digest" options for some crazy reason.

How do I get the header to work?
 
D

Daniel Yoo

[exhasperated Mailman rant cut]


Hi Carol,

Your question isn't really related to Python: Python's just the
implementation language for Mailman. A better bet is to ask your
question on "Mailman Users":

http://list.org/lists.html

where you can get help from dozens of other long-suffering Mailman
administrators.


: I'm trying to get a header to get attached tot he email. it gets stripped
: from the email, whwere as the footer comes in as an attachment.
: all this is buried under "non-digest" options for some crazy reason.

Having a header is dependent on how messages are delivered. In digest
mode, messages are bundled and delivered as a single message. Sending
the same header, over and over in the bulk-message, would not be a
good idea.

So that's why there is a separate variable option that describes the
header for non-digest messages (msg_header), and one for digest
messages (digest_header). I guess it might make sense to have a
separate "Header/Footer" configuration menu, but that's a user
interface issue.



: How do I get the header to work?

Did you update the 'msg_header' variable?


Please continue your questions on the 'Mailman Users' mailing list;
you should get better help from them.


Good luck to you!
 
Y

Yang Zhang

Hi all,
I wonder if it is possible to create an object of func, class or
method in the run time by it's name? To make it more clear, let me show you
an example: I parsed the python code and found a function with name 'len'. I
want to know if it is a build-in func(where can I look up?). If so, ignore
it otherwise I want to find out which module is it defined in. All I know is
the name (which is a string), and all the modules that this program have
imported. In the same way, I also need to process the class and methods
call. I wonder if it is possible? I will appreciate your help very much!!

-Ryan
 
Y

Yang Zhang

Hi all,
I wonder if it is possible to create an object of func, class or
method in the run time by it's name? To make it more clear, let me show
you an example: I parsed the python code and found a function with name
'len'.
I want to know if it is a build-in func(where can I look up?). If so,
ignore
it otherwise I want to find out which module is it defined in. All I know
is the name (which is a string), and all the modules that this program have
imported. In the same way, I also need to process the class and methods
call. I wonder if it is possible? I will appreciate your help very much!!

-Ryan
 
N

Nick Vargish

Carol Carrot said:
now what is +1 QOTW.supposed to mean?

Someone just voted for (+1) your statement as a Quote of the Week,
which appears at the start of the weekly summary...

Nick
 
C

Christopher T King

I want to know if it is a build-in func(where can I look up?). If so,
ignore it otherwise I want to find out which module is it defined in.

All functions and classes have a __module__ attribute which is set to the
name of the module in which they were defined.
All I know is the name (which is a string), and all the modules that
this program have imported.

If you first "import __main__", you can use getattr(__main__,"foo") to get
the object named "foo" in the global namespace.
In the same way, I also need to process the class and methods call. I
wonder if it is possible? I will appreciate your help very much!!

Here is a small snippet demonstrating the above:

import __main__
from types import FunctionType, ClassType

def which_module(name, where = __main__):
try:
obj = getattr(where, name)
except AttributeError:
obj = getattr(__builtins__, name)
try:
return obj.__module__
except AttributeError:
if not isinstance(obj, (FunctionType, ClassType)):
raise TypeError, "%s doesn't reference a function or class" % name
return None

print which_module('list') # --> '__builtin__'
from math import sin
print which_module('sin') # --> 'math'
a = 6
print which_module('a') # --> TypeError

Hope this helps.
 
C

Carol Carrot

weekly summary!
Wahoo!!!!

Nick Vargish said:
Someone just voted for (+1) your statement as a Quote of the Week,
which appears at the start of the weekly summary...

Nick
Ojdl!Wbshjti!=obwAcboefstobudi/psh?')
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,188
Latest member
Crypto TaxSoftware

Latest Threads

Top