Well i want to input a python function as an input in run time and execute that part of code \'n\' no of times. For example using tkinter i create a textbox where the user w
Python provides number of ways to do this using function calls: - eval() - exec()
For your needs you should read about exec.
That's what execfile()
is for.
http://docs.python.org/library/functions.html#execfile
Create a temporary file.
Write the content of the textbox into the file.
Close.
Execfile.
Delete when done.
Would IPython do?
Doc: http://ipython.scipy.org/moin/Documentation