Re: [BangPypers] How to dynamically load modules in Django/Python

2014-12-23 Thread Saager Mhatre
On Thu, Dec 18, 2014 at 12:18 AM, mithun chackravarthy < vbnetmit...@gmail.com> wrote: > Thanks Saager, got it. http://imdb.to/glad-to => One is glad to be of service. - d ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailm

Re: [BangPypers] How to dynamically load modules in Django/Python

2014-12-23 Thread Saager Mhatre
On Wed, Dec 17, 2014 at 11:19 PM, Navin Kabra wrote: > Saager Mhatre writes: > > > I suppose the __import__ function > > should be > a > > good start. > > Also check out the "imp" module. > > from imp import load_source > load_source(

Re: [BangPypers] How to dynamically load modules in Django/Python

2014-12-17 Thread mithun chackravarthy
Hi Amit As like this os.environ.setdefault("DJANGO_SETTINGS_MODULE", "appname.settings") am importing it. Thanks, Mithun On Thu, Dec 18, 2014 at 10:58 AM, Amit Sethi wrote: > > Mithun a suggestion, checkout how settings.py file is imported in your > manage.py > > Thanks > Amit > ___

Re: [BangPypers] How to dynamically load modules in Django/Python

2014-12-17 Thread Dhruv Baldawa
You can also take a look at importlib - https://docs.python.org/2.7/library/importlib.html On Thu, Dec 18, 2014 at 10:58 AM, Amit Sethi wrote: > > Mithun a suggestion, checkout how settings.py file is imported in your > manage.py > > Thanks > Amit > ___

Re: [BangPypers] How to dynamically load modules in Django/Python

2014-12-17 Thread Amit Sethi
Mithun a suggestion, checkout how settings.py file is imported in your manage.py Thanks Amit ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers

Re: [BangPypers] How to dynamically load modules in Django/Python

2014-12-17 Thread mithun chackravarthy
Thanks Saager, got it. On Wed, Dec 17, 2014 at 10:10 PM, Saager Mhatre wrote: > > On Mon, Dec 15, 2014 at 1:52 AM, mithun chackravarthy < > vbnetmit...@gmail.com > > wrote: > > > > > > How can I achieve this.Thanks for your time. > > > > I suppose the __import__ function >

Re: [BangPypers] How to dynamically load modules in Django/Python

2014-12-17 Thread Saager Mhatre
On Mon, Dec 15, 2014 at 1:52 AM, mithun chackravarthy wrote: > > > How can I achieve this.Thanks for your time. > I suppose the __import__ function should be a good start. - d ___ BangPypers

[BangPypers] How to dynamically load modules in Django/Python

2014-12-14 Thread mithun chackravarthy
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 argumen