execfile return values

Enrique enrique.palomo at xgs-spain.com
Fri Oct 3 11:29:28 EDT 2003


My english is not very good. So, i can't explain like in my native language.
Cause of that, maybe I have found your mail not very friendly.
I've read the  docs of execfile, of course. And "reread" it before write
you.
I only want  to know if there is a way to catch the value of and execution
like in os.system.
using execfile.
thanks again

-----Mensaje original-----
De: python-list-admin at python.org [mailto:python-list-admin at python.org]En
nombre de Terry Reedy
Enviado el: viernes, 03 de octubre de 2003 16:19
Para: python-list at python.org
Asunto: Re: execfile return values


"Enrique" <enrique.palomo at xgs-spain.com> wrote in message
news:mailman.1065180983.27200.python-list at python.org...
'''
##ex.py###
a=execfile('scr.py')
print "return value: ", a

##scr.py###
print "i'm scr.py"

Executing that, a takes  None value.
'''
As documented in Lib Ref 2.1 Built-in Functions.  If you have not read
the execfile doc, please do, or reread.  If you have read (or reread),
tell us what part you do not understand.

>Is there a way to handle the execution of the script ordered by the
execfile statement??

I do not understand 'handle the execution of'.  What you are trying to
accomplish that did not happen?

Terry J. Reedy


--
http://mail.python.org/mailman/listinfo/python-list



**AVISO DE CONFIDENCIALIDAD**
La información contenida en este mensaje y archivos es privada y confidencial estando dirigida solamente al destinatario. Si Ud. ha recibido esta información por error, por favor, proceda a su inmediata destrucción. Cualquier opinión o punto de vista contenido en este mensaje corresponde al remitente y necesariamente no representa la opinión del GRUPO XEROX.





More information about the Python-list mailing list