I guess you can do inside the web2py shell environment.

>>> execfile("applications/myapp/models/acontroller/somefile.py")

Not tested, but should work.

if you are using Ipython, doing

>>> edit path/to/file and then exit saving the file the file is also
executed

On Sun, Jan 15, 2012 at 7:55 PM, Robert Clark <[email protected]>wrote:

>
> If running a web2py shell, how can model files within controller
> subdirectories be made available in the environment?
>
> For example if we have these two model files:
> myapp/models/db.py
> myapp/models/acontroller/db_controller.py
>
> Then when launching web2py using:
> $> python web2py.py -S myapp -M
>
> Typing 'db.tables' prints tables defined in db.py
>
> Is there a way to specify a controller (or function) to execute models
> for in a web2py shell?
>
> Thanks
>



-- 

Bruno Rocha
[http://rochacbruno.com.br]

Reply via email to