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
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to