On Apr 30, 11:05 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > TkNeo<[EMAIL PROTECTED]> writes: > > > George - Thanks for your reply but what you suggested is not working: > > > def FA(param1,param2): > > print "FA" + param1 + " " + param2 > > def FA(param1,param2): > > print "FB" + param1 + " " + param2 > > def FA(param1,param2): > > print "FC" + param1 + " " + param2 > > > temp = sys.argv[1] > > > func = globals()["F" + temp] > > func("Hello", "World") > > > I ran the script with first parameter as B and i get the following > > message > > KeyError: 'FB' > > Perhaps if you call your three function FA, FB, FC instead of FA, FA, > FA it'll help? > > -- > Arnaud
oh crap. I can't believe I was doing that ! :) Thanks for pointing out. works perfect. -- http://mail.python.org/mailman/listinfo/python-list