[Tutor] Tutor Digest, Vol 20, Issue 11

jake skipper dollar0613 at yahoo.com
Thu Oct 6 18:27:53 CEST 2005

Please take me off of your mailing list.

tutor-request at python.org wrote:Send Tutor mailing list submissions to
tutor at python.org

To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to
tutor-request at python.org

You can reach the person managing the list at
tutor-owner at python.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Tutor digest..."

Today's Topics:

1. Re: need help to understand terms for desinging a program
(paul brian)
2. Re: FW: Help Needed (Alan Gauld)
3. How to strip both single and double quotes (Dick Moores)


Message: 1
Date: Wed, 5 Oct 2005 10:22:48 +0100
From: paul brian 

Subject: Re: [Tutor] need help to understand terms for desinging a
To: "Hameed U. Khan" 
Cc: tutor at python.org

Content-Type: text/plain; charset=ISO-8859-1

This is a pretty big question, and it would be easier to answer if you
can give us more details about what you want to do.

It seems you want to inspect outgoing mails (possibly rewrite their
addresses?) before the mails are sent out.

If you are looking to send out emails to a list then I suggest looking
at mailman - a python mailing list manager.

If you want to use python to examine mail messages and do not care
what mailserver (MTA) you use you could try exim instead of qmail and
then try exim-python. 

On 10/5/05, Hameed U. Khan wrote:
> Hi,
> I need to make a program which will accomplish following. I dont
> need the code. I want to make it myself. But I need guidance from you
> people because I am not a good programmer. I need help in
> understanding following terms.
> " qmail-queue reads a mail message from descriptor 0. It
> then reads envelope information from descriptor 1. It
> places the message into the outgoing queue for future
> delivery by qmail-send.
> The envelope information is an envelope sender address
> followed by a list of envelope recipient addresses. The
> sender address is preceded by the letter F and terminated
> by a 0 byte. Each recipient address is preceded by the
> letter T and terminated by a 0 byte. The list of recipi-
> ent addresses is terminated by an extra 0 byte. If qmail-
> queue sees end-of-file before the extra 0 byte, it aborts
> without placing the message into the queue."
> I want to inspect messages before passing them to actuall qmail-queue
> program.
> Thanks in advance for your help.
> --
> Regards,
> Hameed U. Khan
> Registered Linux User #: 354374
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor

Paul Brian
m. 07875 074 534
t. 0208 352 1741


Message: 2
Date: Wed, 5 Oct 2005 10:44:09 +0100
From: "Alan Gauld" 
Subject: Re: [Tutor] FW: Help Needed
To: "Daniel Watkins" , 
Message-ID: <003d01c5c991$55cd0e70$0c01a8c0 at xp>
Content-Type: text/plain; format=flowed; charset="UTF-8";

> When I am in Python Shell of the IDLE GUI, when I click Edit/Run

You shouldn't be running scripts when in the shell, it executes them 
You use edit/run when working in a script file window.


Alan G 


Message: 3
Date: Wed, 05 Oct 2005 02:43:47 -0700
From: Dick Moores 
Subject: [Tutor] How to strip both single and double quotes
To: tutor at python.org
Message-ID: < at rcblue.com>
Content-Type: text/plain; charset="iso-8859-1"; format=flowed

I'm writing a script that takes any text and outputs to a file a list of 
duples (k, word) where k is the number of occurrences of word in the text.

The text will contain "words" beginning or ending with non-alphabetic 
characters. To strip them off I use string.strip([chars]). My question is 
how to use strip just once to get rid of both kinds of quotes, single and 
double. It seems necessary to do it something like this:

# L is the original list of "words" in the text.
newL = []
for word in L:
word = lower(word)
newWord = word.strip(".,!?;:&*'=-> newWord2 = newWord.strip('.,!?;:&*"=-> word = newWord2

But is it? Have I missed something?


Dick Moores


Tutor maillist - Tutor at python.org

End of Tutor Digest, Vol 20, Issue 11

Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20051006/4f6d7ebd/attachment.html

More information about the Tutor mailing list