Execute external code and get return value
Michele Petrazzo
michele.petrazzoDELETE at DELETEunipex.it
Fri Sep 29 08:22:55 EDT 2006
More information about the Python-list mailing list
Fri Sep 29 08:22:55 EDT 2006
- Previous message (by thread): [IronPython] [ANN] IronPython Community Edition 1.0r2
- Next message (by thread): Execute external code and get return value
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
I want to execute an external code, that become from a text file (pe),
call a function inside it and get its return value:
# ext_code.txt
def funct2Call():
return True
# test.py
sourcecode = open("ex_code.txt").read()
comp_code = compile(sourcecode, "My_test", "exec")
#do something like this
return_value = comp_code.funct2Call()
But I can't...
I find this:
http://tinyurl.com/nwbpk
but here, it call from the external code a function inside my code. I
want the opposite!
Is there a solution for do this?
Thanks,
Michele
- Previous message (by thread): [IronPython] [ANN] IronPython Community Edition 1.0r2
- Next message (by thread): Execute external code and get return value
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list