Hi ,

I need to load modules dynamically from one of my django app .


   1. lets say 'test' is my app name and am having functions inside it.
   2. in an util function I need to load modules dynamically when a
   function (loader_function) is called with appname and list of functions as
   arguments

      utils.py

      def loader_function(*appname*, *functions*):
             from *'appname'* import *'[list of functions passed]'*
             do SOME stuff
             return stuff

     views.py

     from utils import loader_function
*     stuff =  loader_function('test', ['fun1', 'fun2']*

How can I achieve this.Thanks for your time.

Thanks
Mithu
_______________________________________________
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers

Reply via email to