passing string from one file to another

Kun neurogasm at gmail.com
Mon Apr 17 00:25:18 EDT 2006


Kun wrote:
> I have a python-cgi form whose sole purpose is to email.
> 
> It has the fields 'to', 'from', 'subject', 'body', etc. and if the user 
> fills them out and clicks submit, it will invoke another file called 
> mail.py which uses smtplib to send the message.
> 
> This works fine but instead of typing in a 'body', i would like the 
> initial python program to just send a string as the body of the email. 
> now normally i'd just set the msg in the mail.py file equal to the 
> string, however, i do not know how to link a string from another python 
> file to the mail.py file.
> 
> does anyone know a solution to this?

i am aware that i could write the string to a text file and invoke it 
with the second python program, however, unfortunately i do not have 
write permission on the server i am working with, thus we need to find 
some other way...

your help would be greatly appreciated



More information about the Python-list mailing list