Are you running the binary version of web2py (on OSX or Windows)? If so, it has its own Python interpreter and will not use your machine's Python installation. If you've already got Python on your machine, run the source version of web2py.
Anthony On Monday, December 7, 2015 at 6:03:36 PM UTC-5, Jitun John wrote: > > > Hi I am an amateur programmer and new to web2py. > > I have written python scripts with apsw imported. ( > http://rogerbinns.github.io/apsw/ > <http://www.google.com/url?q=http%3A%2F%2Frogerbinns.github.io%2Fapsw%2F&sa=D&sntz=1&usg=AFQjCNF_XZBfJQ6ZMTjSxd8SNX2kQ58NAw> > ) > It allows me to create a db in the memory and once all > processing/insertion is done, one can backup the date to an .sqlite file on > the disk. > This .sqlite file can be read and loaded into the memory at some later > point in time as well. > I was wondering if I can import apsw into web2py module .py (apsw works > with python 2.x) > At present I get "Cannot import module applications.admin.modules.apsw" > > mem_db_connection = apsw.Connection(":memory:") > cursor = mem_db_connection.cursor() > > # Copy from memory to file > with global_db_backup_con.backup("main", mem_db_connection, "main") as > backup: > backup.step() # copy whole database in one go > > If not, then is there anything similar I can use in web2py ? > I plan to make a simple log analysis app which runs on locally on clients > unit. > -- 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]. For more options, visit https://groups.google.com/d/optout.

