Dear All,

I want to use getattr() to collect a list with all the functions on my simple script those has got some functionname like 'On....'.

#This should be the complete file
def OnMenuFindMe():
    print 'You found me'

f = getattr(What_Should_It_Be???, 'OnMenuFindMe')

f()
#Till here

It can use getattr() to get an object of a class or module, but not in this much simpler situation.



Yours sincerely,
______________________________
János Juhász

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to