Oups, reload does not take a string but a module object so forget the
quotes.

It would be difficult to change the behavior of reload.

Is reload(my_module) working? I didn't try.

On 26 avr, 10:04, pierreth <pierre.thibau...@gmail.com> wrote:
> On 26 avr, 08:28, Massimo Di Pierro <massimo.dipie...@gmail.com>
> wrote:
>
> > import my_module # not right now always assumes reload=False (I
> > think).
>
> Yes, assume reload is False. This is the normal behavior for Python.
> So the code can be:
>
> if "my_module" in dir() and DEBUG:
>   reload("applications.my_app.modules.my_modules")
> import my_modules
>
> reload is working the way it was. Would it be better to adapt it so we
> can simply write "reload('my_module')"?

Reply via email to