I use an older version of that stateful AJAX shell (without any of the 
google app stuff) where i can just import dal.py, make a connection string 
to a database folder  (can use auto_import), then give 'db' to the shell's 
environment (its just a parameter) . Then you get cmd line access to a DB 
using DAL. A huge advantage is that you can write any function within the 
scope of the shell and access it at the cmd line with parameters (if a 
function takes any) I.e. a function that will print an ascii grid to the 
screen (lets call the function 'grid'), you can do:

$> grid query=db.auth_user.id>0 fields=id,name,email,email_password

or simply type something like that select command (or anything else 
supported by DAL)...

Setting up a shell this way works really well, has history of previous 
commands (with up and down arrow), and is really worth the time to setup. 
Especially given that you can tailor it to your own needs (and its 
re-usable, no matter the DB you are pointing to). I can send a template of 
the code if interested.

Mart

On Saturday, March 17, 2012 9:47:55 PM UTC-4, Anthony wrote:
>
> On Saturday, March 17, 2012 8:06:38 PM UTC-4, Stefan Scholl wrote:
>>
>> Anthony <abasta...@gmail.com> wrote:
>> > I highly recommend just doing this:
>> > 
>> > python web2py.py -S myapp -M -N
>> > 
>> > in a regular shell, and skip the web-based shell. You can even do 
>>
>> There is no python executable in the Windows version of web2py.
>>
>
> In that case:
>
> web2py.exe -S myapp -M -N
>
> Though if you're going to do any serious work with web2py, you're probably 
> best off installing your own version of Python (preferably 2.7) and running 
> web2py from source. Once you've got Python installed, it's just as easy to 
> run web2py from source as it is to use the binary version (download, unzip, 
> click).
>
> Anthony 
>

Reply via email to