[Tutor] Help with Python install

Sheila King sheila@thinkspot.net
Mon, 15 Jan 2001 08:50:50 -0800


On Mon, 15 Jan 2001 10:52:36 -0500, D-Man <dsh8290@rit.edu>  wrote about Re:
[Tutor] Help with Python install:

:This line is something to be careful with.  It says to run
:/usr/bin/python which would be version 1.5.1 on your server.  You will
:want to change it to /path/to/my/python to get 2.0 to run. 

Yes, I did do that. It turns out, that I had installed Python2 in a directory
that the mail program did not have permission to access. So I had to reinstall
it in a different directory. Also, I had to modify my .qmail file.

:(I don't know anything about qmail so I can't help with that part of
:the situation)

To summarize, I have at least solve this problem, for now. Here was the
solution:

(1) Install Python 2.0 in a directory that the mail program had permission to
access. So, on my machine I put it here:
/big/dom/xthinspot/Python-2.0/

(2) Put the following contents in my .qmail-pytest file, which is located in
/big/dom/xthinkspot/ 

----------------------------------------------------------------------------
|/big/dom/xdomain/Python-2.0/python /big/dom/xdomain/mailtofile.py |vdeliver
----------------------------------------------------------------------------

(3) The script, mailtofile.py, was located in the directory
/big/dom/xthinkspot

Here is the contents of that file:

-------------------------------------------
#! /big/dom/xdomain/Python-2.0/python

import sys, os

rawmessage = sys.stdin.read()
outfile = open("./outmessage.txt", "w")
sys.stdout=outfile
print rawmessage
outfile.close()
os.chmod("./outmessage.txt", 0664)
-------------------------------------------

Then, when an email was sent to pytest, it would be printed to a file.

So, that one is solved.

Now I'm trying to work with the rfc822 module, and having problems again. Ah,
well. Will keep working at it.


--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org/