In <[EMAIL PROTECTED]>, David Bear wrote: > I would like to write some code that would randomly select a function from a > list of functions and call it. I was looking in the globals names space and > randomly selecting items that were of type function.. but I didn't see a > way of actually running the function.
If you have a function or callable you call it with the "call operator", which are parenthesis: In [8]: int Out[8]: <type 'int'> In [9]: int() Out[9]: 0 For a random selection of an element from a list look at the `random.choice()` function. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list