Re: Running python apps from within python apps

2006-01-14 Thread Peter Hansen
aph wrote: > actually 'exec()' is the function I was looking for. Working code: > > class myApp: > > def kalle(self,str): > return str.upper() > > def run_script(self,script): > exec(script) > > app = myApp() > app.run_script("print self.kalle('hello')") A very minor po

Re: Running python apps from within python apps

2006-01-14 Thread Claudio Grondi
aph wrote: > actually 'exec()' is the function I was looking for. Working code: > > class myApp: > > def kalle(self,str): > return str.upper() > > def run_script(self,script): > exec(script) > > app = myApp() > app.run_script("print self.kalle('hello')") > > Thanks... >

Re: Running python apps from within python apps

2006-01-14 Thread aph
actually 'exec()' is the function I was looking for. Working code: class myApp: def kalle(self,str): return str.upper() def run_script(self,script): exec(script) app = myApp() app.run_script("print self.kalle('hello')") Thanks... -- http://mail.python.org/mailman/list

Re: Running python apps from within python apps

2006-01-14 Thread Claudio Grondi
aph wrote: > Hello. I'm sure this has been asked before, but I can't find an answer > anywhere. > > I want to create a truly "dynamic" app which can get new functions > "on-the-fly" and run them without having to re-start the main app. > > I've found the code module that looks kind of hopefull. F