The command written in previous message is meant to be run along with web2py server, not instead.
If that's what you mean by isolation. Not sure if I understand the question. Marin On Sun, May 4, 2014 at 5:35 PM, <jaw...@gmail.com> wrote: > Thanks Marin > > Is there any way to tun the script in "isolation" so that it can detect > the tables? > > My current setup is that I have the web2py.py server already running and > then running each Private script in isolation (general web scraping). > > > On Sunday, 4 May 2014 09:58:38 UTC+2, Marin Pranjić wrote: > >> Tables are in there but if you don't call db.define_table(...) DAL will >> not know about them. >> >> How are you running the script in private? >> >> >> You can do something like this: >> python web2py.py -S appname -M -R applications/appname/private/ >> scriptname.py >> >> This will run your models before running the script, so scriptname.py >> will have access to DAL and everything. >> Of course, this expects table definitions in application's model files. >> >> Marin >> >> >> On Sat, May 3, 2014 at 2:03 PM, <jaw...@gmail.com> wrote: >> >>> I'm trying to query my tables from the private folder: >>> >>> from gluon.tools import DAL >>> >>> db = DAL("sqlite://../databases/storage.sqlite") >>> print db.tables >>> >>> However none of my tables can be seen. >>> >>> The idea is to have a better manner of extracting data rather than the >>> old-school: >>> >>> with sqlite3.connect('../databases/storage.sqlite') as conn: >>> c = conn.cursor() >>> etc.... >>> >>> What am I missing? >>> >>> -- >>> Resources: >>> - http://web2py.com >>> - http://web2py.com/book (Documentation) >>> - http://github.com/web2py/web2py (Source code) >>> - https://code.google.com/p/web2py/issues/list (Report Issues) >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "web2py-users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to web2py+un...@googlegroups.com. >>> >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.