The easiest way is this: download the windows version of web2py. Unzip it. Put all the modules you need in web2py/site-packages. Install your app (bytecode compiled) and call it "init". Then zip the web2py folder again. That is your distributable binary app.
On Wednesday, 9 December 2015 09:03:27 UTC-6, Jitun John wrote: > > Thanks a lot Massimo Di Pierro, Its working great. > I wanted to make an .exe of the application, so I added to > web2py/applications/yourapp/modules/ > I kind of figured out how to use DAL with similar functionality. > So I will play with both settings. > > > On Tuesday, December 8, 2015 at 10:43:43 AM UTC+5:30, Massimo Di Pierro > wrote: >> >> You can definitively do that. You can use any module that works with >> python with web2py. You just have to make some choices about whether you >> want to distribute your module with your app or not. >> >> If you do not want to distribute it with your app: >> - If you run web2py from source you can put it into the normal python >> site-packages >> - if you run web2py binary, you have to put your module in >> web2py/site-packages >> >> If you do want to distribute it with your app, then it is a web2py >> specific logic. >> - you have to put it into web2py/applications/yourapp/modules/ and you >> still import with "import modulename". >> Not all modules can be distributed distributed in >> web2py/applications/yourapp/modules/. Only modules that do not assume they >> are in site-packages and use relative import. >> >> Massimo >> >> >> >> On Monday, 7 December 2015 17:03:36 UTC-6, 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/) >>> 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.

