Calling function

Dominik Kotowicz dkoto.nie at spamuj.poczta.onet.pl
Tue Feb 25 09:28:49 EST 2003


Hello,

How I can call function from module if when program have to call
function I have only this function name in string variable:

Example:

===
module1.py:

def foo():
	print "OK"
	

===
mainprog.py :

import module1

function_name = raw_input()

#and here I type: 'foo' and I would like call this functionwith


--
Best regards
Dominik Kotowicz




More information about the Python-list mailing list