本文介绍了Python网络服务......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 大家好,我已经完成了制作一个python程序,对bmp文件进行了一些 图像处理。 我现在想要将这个程序作为Web服务提供。用户可以访问 站点并通过Web界面将文件上传到web 服务器,然后服务器将使用python 程序我写过,当用户完成后必须得到图片 文件回来。 我的问题是设置一个可以运行的web服务器 python easy?我应该尝试ZOPE还是有更好的想法?Hi folks, I have accomplished to make a python program that make someimage manipulation to bmp files.I now want to provide this program as a web service. A user can visit asite and through a web interface he should upload the file to the webserver , the server then will do the image process with the pythonprogram I have wrote and when it finish the user must get the imagefile back .My question is how difficult is to set up a web server that can runpython easy ? should I try ZOPE or there is something better in mind ?推荐答案 对于一次性的东西,普通的旧CGI可能就足够了。你可以有一个带有上传表格的 静态HTML页面,让python执行 图像部分,并使用带有python的图像生成返回HTML /> 脚本。如果你计划这么做,或者想要相当复杂的东西,或者下面的数据库访问,身份验证等,那么你可能会想要看看任何一个web framewoks。如果你没有网络已经处理好的服务器部分(例如,你已经拥有了Apache,并且已经运行了),那么Web服务器框架可以更多对于Web框架,在Python网站上有一个很长的列表。 哪种框架最适合你可能取决于你想要的 现在和将来都会完成。你可以尝试一些简单的东西和极简主义(以及你可以在不到一个下午阅读的文档) 如Karrigell,或者尝试更复杂的东西,比如Django , TurboGears,Pylons,CherryPy等。 然后,您可以尝试CGI方法开始,并作为您的 需要变得更加复杂,转向框架。 (这是我们自己的 路径:我们已经使用普通的CGI超过一年的时间用于我们开发的基于网络的生物信息学应用程序R和Python用于 计算,现在转向框架)。 祝你好运! R 。 - Ramon Diaz-Uriarte 生物信息学部门 西班牙国家癌症中心( CNIO) http://ligarto.org/rdiaz 现在这个时候我更喜欢做一些最快的工作 可能... 我从未有过使用CGI的经验,我是否需要设置一个网络服务器 $ b这是$ b? 你能指点我一些有用的阅读资料,这样我就可以开始了吗? 我会在Zope上发表评论,我已经安装过一次这是非常容易的 。不知道我的工作是否也很容易...... Gracias Ramon。At this time right now I prefer to do something that works the quickestpossible...I never had any experience with CGI, do I need to set up a web serverfor that ?can you point me some usefull reading material so I can get a start ?I will post for a comment at Zope , I had installed once and it wasvery easy. Don''t know if it will be easy too to get my job done...Gracias Ramon. 如果你需要一个快速启动和简短的学习曲线,Karrigell就是 一个去。您可以在下载它的几分钟内运行您自己的网站/网络应用程序 的开头。 它现在有更好的CGI处理 - 如果你必须走这条路:) www.karrigell.com 我也推荐Karrigell巡演,点击每个 示例旁边的图标,看看每个例子是如何编码的,并且它有一个文件上传示例 应该让你入门。 http://karrigell.no-ip.info/demo/frame_tour_en.htm :)If you need a quick-start and short learning curve, Karrigell is theone to go for. You can have the beginnings of your own site/web-apprunning within minutes of downloading it.It now has better CGI handling too - if you must go that route :) www.karrigell.comI recommend the Karrigell tour also, click on the icon next to eachexample to see how each one is coded, and it has a file upload examplethat should get you started. http://karrigell.no-ip.info/demo/frame_tour_en.htm:) 这篇关于Python网络服务......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-19 16:50