This shell for web2py is quite cool. (You can look here for a Google tranlation of the original.) For those new to this stuff (like me), and if you’re working on something specific you can specify that in the environment. If you want to play with your model straight away, and it’s named ‘db’, you can add
environment[‘db’]=__import__(‘applications.%s.models.db’ % app, fromlist=[‘*’])
Just a convenience thing for testing.
As I worked with it, I wanted to load it into iPython. My very poor way is I have a small script to just load the environment.
from shell import *
app=raw_input(‘app to load environment for:’)
for k,v in env(app).items(): locals()[k]=v
# in ipythonrc add
so when I load up iPython, it’s all loaded up and waiting to go. Very very nice.