Re: executing a function with feeding its global variables

2011-02-12 Thread Jean-Daniel
On Sat, Feb 12, 2011 at 7:25 PM, Peter Otten <__pete...@web.de> wrote: > Jean-Daniel wrote: > >> Hello, >> >> I am writing a small framework where the user which writes a function >> can expect some global variable to be set in the function namespace. >> >> The user has to write a function like thi

Re: executing a function with feeding its global variables

2011-02-12 Thread Peter Otten
Jean-Daniel wrote: > Hello, > > I am writing a small framework where the user which writes a function > can expect some global variable to be set in the function namespace. > > The user has to write a function like this: > """ > # function.py > from framework import, command, run > > @command >

executing a function with feeding its global variables

2011-02-12 Thread Jean-Daniel
Hello, I am writing a small framework where the user which writes a function can expect some global variable to be set in the function namespace. The user has to write a function like this: """ # function.py from framework import, command, run @command def myfunc(): print HOST if __name__==