return values from scripts

Aahz Maruch aahz at panix.com
Tue Apr 17 15:20:21 EDT 2001


In article <3ADC8257.CC51FE1B at ornl.gov>, Mike Burnett  <mnb at ornl.gov> wrote:
>
>While running a script in the python interpreter, I need to run a second
>script from the first, passing some values to the second.  I know I can
>do this with: execfile('second.py',locals()).  Is there any way to get
>back into the original script one value (a return status) from the
>second script?  Is there any way to get several parameter values back?

Why not just modify the second script to be a function and import it?
-- 
                      --- Aahz  <*>  (Copyright 2001 by aahz at pobox.com)

Androgynous poly kinky vanilla queer het Pythonista   http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

"If we had some ham, we could have ham & eggs, if we had some eggs." --RH



More information about the Python-list mailing list