Can a standalone web application built with cherrypy be compiled?

梦想与她 提交于 2019-12-12 04:25:22

问题


I want to build a web application that stands completely by itself, apache not required. Is cherrypy a good solution, and can this be compiled with something like py2exe?


回答1:


Python is a scripting language and is not usually compiled. What you are talking about is packaging your scripts into an exe (via p2exe), bundled with the relative modules and an interpreter.

This is possible with many scripts, including CherryPy, as p2exe basically sticks all your scripts together in one place, then executes it with the interpreter. This link will allow you to build your application into an exe. I would however recommend that you use pyinstaller instead, as I have found it to be much easier.

This question shows that you can daemonize CherryPy, and from the page of CherryPy ->

Your CherryPy powered web applications are in fact stand-alone Python applications embedding their own multi-threaded web server. You can deploy them anywhere you can run Python applications. Apache is not required

So yes you can deploy CherryPy, self-contained without Apache. CherryPy seems to be a fine solution.




回答2:


You are basically describing web2py.



来源:https://stackoverflow.com/questions/1967705/can-a-standalone-web-application-built-with-cherrypy-be-compiled

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!