I use the absolute path in my code. Also, you should be able to make this work without the define tables....
-Jim On Monday, March 3, 2014 11:22:44 PM UTC-6, Gwayne aka Mike Veltman wrote: > > > O well the situation is as follows, I have a database and created a web2py > webinterface with it. But I also have create some commandline tools that > reverence the database. > > So I wondered if there was a easy way to include dal in the scripts and > talk to the database. > > So webgui is the webinterface of the deployment application. > > Jim I want to use the database so I guess I need the define tables > > I tried to to it as explained in the ebook but I got a error (with mongodb) > > Btw is the path_to_application_databases relative to web2py path or > absolute ? > > > Thanks as always btw > > Actually now I got it working. Mmm, so I just have to add a function that > checks if its called from within web2py or from the outside. > > Thanks Jim for making me look at it again. I had not done the define > tables. > > > On Tuesday, 4 March 2014 00:03:10 UTC+8, Anthony wrote: >> >> In a script, you can just import it like any other Python module. Not >> sure what you mean by calling it from "the webgui". >> >> Anthony >> >> On Monday, March 3, 2014 3:58:39 AM UTC-5, Gwayne aka Mike Veltman wrote: >>> >>> I will actually call dal from within some scripts and from the webgui. >>> What would be the best and cleanest way to do that ? >>> >> -- 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/groups/opt_out.