Re: [web2py] Re: Running DAL oustide web2py

2010-03-29 Thread Thadeus Burgess
Alternatively if this is just a script (like cron) or a simple program and you do not mind loading the entire web2py environment python web2py.py -S welcome -M -R /path/to/my/script.py -S denotes the app name, -M denotes execute models and -R is the path to the script to execute in the environmen

[web2py] Re: Running DAL oustide web2py

2010-03-29 Thread rfx_labs
Hi Giovanni, I had the same problem and here is my simple solution: model.py: from gluon.dal import DAL, Field db = DAL("sqlite://storage.db") db.define_table("reference", Field("name", "string", notnull=True), Field("L", "double"), Field("a", "double"),