[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Calling function by string name
- From: "Peter Prade" <Peter.Prade@...>
- Date: Tue, 28 Jan 2003 19:39:08 +0100
> So, how do I get a "handle" to function "funcname", having
> it's (string) name? Like:
>
> handle = get funcion by name ("ent_wall")
>
> call(handle, args) -- call global function "ent_wall"
just read it from the globals table: (all global variables are just entries
in that table)
handle = globals()["ent_wall"]
Cheers,
Peter