开发者

Is there a difference between developing a web2py app on Windows or Linux?

I recall setting up other framewo开发者_运维百科rks in a Windows environment were extremely painful :)


It's actually extremely easy to set up web2py on Windows -- it will literally take you about a minute. Just go to the download page, download the "For Windows" version, unzip the downloaded file, and click the 'web2py.exe' file in the 'web2py' folder. Voilà -- you're running web2py and ready to build an app. You don't even have to have Python installed on your system because the Windows version includes its own Python interpreter. It also comes with the SQLite RDBMS and its own web server. It has no dependencies and requires no installation (you can even run it from a thumb drive).

Note, if you want to use your own installation of Python instead of the interpreter included with the Windows version of web2py, you can download the source code version of web2py instead. It's just as easy to set up (just download and unzip), but instead of a 'web2py.exe' file, there is a 'web2py.py' file that you'll click to start the server (you can also enter 'python web2py.py' at a command prompt).

If you have any questions, you'll get lots of help from the mailing list.


I use web2py on Windows and it is a piece of cake. The web2py.com download page has a binary version that you can run even if you don't already have Python installed - download, unzip, run web2py.exe, enter admin password and start using it. The exe version comes with everything you need to start coding and connect to a sqlite or MySQL database. If you need to connect to a different DB (Postgres, MS SQL, Oracle, etc.) then you'll want to install Python & the necessary Python DB adapters yourself and run the source version of web2py.

Development of your web2py app on Windows is no problem - you can use the web-based web2py "app admin" to code your app right in the browser if you want. Or you may use any text-editor/IDE that you wish. The web editor is handy for small projects/quick tweaks, but I usually end up using pyScripter or NetBeans.

As far as deploying for production use, well then running on Windows offers you fewer options than on Linux. The built-in web server (rocket) will work ok for moderate loads - if you're just doing an intranet app it's probably fine. If you're intending to run a larger public site then you'll want to consider running web2py with another web server - Apache will work with web2py under Windows. (See chapter 11 in the online book.) Of course just because you started development on Windows doesn't mean your final deployment has to be Windows based - you can pretty much just transfer your code over to a Linux server with web2py (and optionally Apache/nGinx/Cherokee/lighttpd) installed and your set.

When in doubt, refer to the official web2py book and ask your questions in the web2py Google group which is very active and helpful. Web2pyslices.com is also a handy resource when you're looking for how to do things or more deployment recipes.


No, there is a Windows installer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜