if you want to be light weight, you could also make a copy of dal.py and put it anywhere it could be referenced, maybe same folder if you want.
then you can simply have this import from dal import DAL from dal import Field or in a folder structure that can be seen as a package by your script then you would simply do from folder1.folder2.dal import DAL from folder1.folder2.dal import Field Mart :) On May 25, 10:09 pm, Bruno Rocha <[email protected]> wrote: > Cool feature! Thanks. I am now planning to use it for a task queue based in > ActiveMQ. > > web2py tagline is really 'improvements on every two weeks, or less' > -- > Bruno Rocha > [ About me:http://zerp.ly/rochacbruno] > > On Wed, May 25, 2011 at 10:43 PM, Massimo Di Pierro < > > > > > > > > [email protected]> wrote: > > now you can do, from ANY python program > > > from gluon import DAL > > db=DAL('sqlite://storage.sqlite',folder='applications/app/ > > databases',auto_import=True) > > print db.tables > > > auto_import = True will rebuild all tables WITHOUT executing the > > modules. Tables will have the right names, field names and field types > > but will not have the right attributes (default, widget, readable, > > writable, etc...) because they make no sense without an HTTP request. > > This is only thought to allow a script to perform inserts and selects. > > > CAVEAT: this requires you run the app at least once using the new > > trunk code since requires the new metadata format. By running the app > > the *.table files are automatically converted to the new format. > > > Give it a try. Let me know if you have ideas for improvements. > > > Massimo > > > P.S. More stuff coming soon. ;-)

