Another problem is that I cannot *easily* import other modules from my
modules in modules/ :)

this means that if I have module X in modules/ and module Y
I cannot do this while in X
import Y

because the cwd is web2py/ so, I have to import by the application
name again, and as "request" is not defined there I have no clue
except including the application name in the import which limits my
deployment options, do we have a solution to this?

I'm planning on creating a large web application with web2py and I'm
doing extensive playing with it and that include reading alot in the
source code to be sure that it's the right tool for me, so, for a
large project modularization is quite important and if I couldn't
modularize my project into modules and create a suitable directory
structure in modules/ that allows me to organize my work, then it
might be a serious problem because I'll end up writing everything in
the wrong place.

Ahmed

On Aug 12, 9:22 pm, Ahmed Soliman <[email protected]> wrote:
> On Aug 12, 5:14 pm, DenesL <[email protected]> wrote:
>
> > To avoid restarting web2py after making changes use:
>
> > exec('from applications.%s.modules.yourmodule import X'
> > %request.application)
> > reload(X) # remove for production
>
> > Denes.
>
> This doesn't work, did you try that? the reason is that X is probably
> a class and you cannot reload a class, you need a module object there.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to