return values from scripts
Alexis Lê-Quôc
alq666 at yahoo.com
Tue Apr 17 15:28:32 EDT 2001
If you do execfile ('second.py', locals ()) and have second.py look like:
do_some_stuff ()
globals ()["x"]= 7
then the enclosing .py will have a local variable named "x", whose value is
7.
-- Alexis Le-Quoc
--- 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?
>
> Mike Burnett
> burnettmn at ornl.gov
>
> --
> http://mail.python.org/mailman/listinfo/python-list
=====
--
Alexis Le-Quoc
New York
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
More information about the Python-list
mailing list