passing string from one file to another

I V wrongbad at gmail.com
Mon Apr 17 01:15:25 EDT 2006


Kun wrote:
> 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.

Where does mail.py get the body from at the moment? And how are you
invoking mail.py? The obvious would be to import mail.py and call a
function in it; then, you would just need to change the string you pass
to the function. But presumably that's not how you've got it set up or
you wouldn't be asking the question. If you can explain a bit more how
your program works that would be helpful, maybe post an exerpt of the
code that shows where mail.py gets invoked from the main program, and
the bit of mail.py that accesses the body that gets sent.




More information about the Python-list mailing list