python-list instead of python-dev would be a better place to post your request. John> I've been trying to understand the email.generator class. There John> are virtually NO examples showing how to "generate" an Email John> message. You might try poking around the Mailman 2.1 source code for examples: % find . -name '*.py' | xargs egrep -i generator ./admin/www/MMGenerator.py:"""Generator for the Mailman on-line documentation. ./admin/www/MMGenerator.py:class MMGenerator(Skeleton, Sidebar, Banner): ./Mailman/Handlers/Scrubber.py:from email.Generator import Generator ./Mailman/Handlers/Scrubber.py:# We're using a subclass of the standard Generator because we want to suppress ./Mailman/Handlers/Scrubber.py:# sub-Generators will get created passing only mangle_from_ and maxheaderlen ./Mailman/Handlers/Scrubber.py:class ScrubberGenerator(Generator): ./Mailman/Handlers/Scrubber.py: Generator.__init__(self, outfp, mangle_from_=0) ./Mailman/Handlers/Scrubber.py: Generator._write_headers(self, msg) ./Mailman/Handlers/ToDigest.py:from email.Generator import Generator ./Mailman/Handlers/ToDigest.py: g = Generator(mboxfp) ./Mailman/Handlers/ToDigest.py: g = Generator(plainmsg) ./Mailman/ListAdmin.py:from email.Generator import Generator ./Mailman/ListAdmin.py: g = Generator(fp) ./Mailman/ListAdmin.py: g = Generator(outfp) ./Mailman/Mailbox.py:from email.Generator import Generator ./Mailman/Mailbox.py: # Create a Generator instance to write the message to the file ./Mailman/Mailbox.py: g = Generator(self.fp) Skip
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4