Loading functions from a file during run-time
Bryant Huang
735115 at gmail.com
Fri Feb 11 13:04:30 EST 2005
Ah, thanks a lot, Grant and Nick.
Let me try to clarify because I think I was unclear in specifying what
I want to do:
1. Read in a file containing a bunch of function definitions:
def f1(x):
...
def f2(x):
...
def f3(x):
...
def f4(x):
...
2. In wxPython, populate a CheckListBox with all the functions defined
in that file.
3. Allow the user to check some of the functions, say for example, f1()
and f3().
4. The program then executes f1() and f3() on some specified data.
The reason I asked these questions is because I don't know what
functions are contained in the function file ahead of time, but I still
want to be able to read those in, then based on which functions the
user selects, to run those accordingly, even though I still don't know,
at design-time, what functions are contained in the function file.
Does that make sense?
Thanks a lot!
Bryant
More information about the Python-list
mailing list