On 11 sep, 02:37, Bachir wrote:
> What if was gibing a string like this: 'math.ceil', and i had to import the
> function(not the module) dynamically(from the string), how can i do that?
> import_module is for importing... modules, not functions.
Why don't you just read the code snippet I posted ?
What if was gibing a string like this: 'math.ceil', and i had to import the
function(not the module) dynamically(from the string), how can i do that?
import_module is for importing... modules, not functions.
2010/9/10 Bachir
> thanks, éthat's really an awesome explanation. thanks
>
> 2010/9/10 T
thanks, éthat's really an awesome explanation. thanks
2010/9/10 Tom Evans
> On Fri, Sep 10, 2010 at 1:05 AM, Bachir wrote:
> > The problem is not the lack of information, the real problem is that i
> don't
> > know what to search for .
> >
> > 2010/9/9 bruno desthuilliers
> >>
> >>
> >> On 9 s
On Fri, Sep 10, 2010 at 1:05 AM, Bachir wrote:
> The problem is not the lack of information, the real problem is that i don't
> know what to search for .
>
> 2010/9/9 bruno desthuilliers
>>
>>
>> On 9 sep, 03:46, maroxe wrote:
>> > Hi, I am trying to understand an other magic thing about django:
The problem is not the lack of information, the real problem is that i don't
know what to search for .
2010/9/9 bruno desthuilliers
>
>
> On 9 sep, 03:46, maroxe wrote:
> > Hi, I am trying to understand an other magic thing about django: it
> > can convert strings to modules. In settings.py, IN
On 9 sep, 03:46, maroxe wrote:
> Hi, I am trying to understand an other magic thing about django: it
> can convert strings to modules. In settings.py, INSTALLED_APPS is
> declared like that:
>
> INSTALLED_APPS = (
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.co
On Wed, 2010-09-08 at 18:46 -0700, maroxe wrote:
> I want to use it later like this: RESOURCE_RENDERER'video' I cannot
> assign directly the function name(eg video_player) because it lives in
> a module that needs settings.py
>
> Any idea?
check out getattr()
--
regards
Kenneth Gonsalves
--
Y
7 matches
Mail list logo