One way is to write the script just like a web2py controller but call it from web2py. See here: http://web2py.com/books/default/chapter/29/04/the-core#Command-line-options
Look at the -S, -M and -R options. Another way is to import the DAL (http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Using-the-DAL-stand-alone-) and auto_import your definitions. What have you tried? What specific problems are you seeing? -Jim On Wednesday, June 12, 2019 at 9:49:31 AM UTC-5, [email protected] wrote: > > How to connect the database in web2py from the external python script? > please help Thanks > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/7a5152f3-c517-4786-a735-ea8fafa1e497%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

