开发者

Python and Web applications

开发者 https://www.devze.com 2023-01-22 07:56 出处:网络
开发者_JAVA百科I want to start writing python to support some of my web applications. Mainly i\'m trying to fetch pages, send POST data to urls and some string manipulation.

开发者_JAVA百科I want to start writing python to support some of my web applications. Mainly i'm trying to fetch pages, send POST data to urls and some string manipulation.

I understand that there are some disadvantages with the urllib in the new versions.

Can anyone please tell me which release is best for my needs?

Thanks


Step 1. Use urllib2 to fetch pages. Save them in flat files

http://docs.python.org/library/urllib2.html

Step 2. Use a WSGI-based server like werkzeug to serve those pages.

http://docs.python.org/library/wsgiref.html

http://werkzeug.pocoo.org/

When you get that working, plug it into a proper web server (like Apache) with mod_wsgi.

http://code.google.com/p/modwsgi/


I don't know your needs ... but did you try twill. It can fetch pages, fill forms, and whatever you need. It contains a "scripting languages" and can be embedded in your python application.

http://twill.idyll.org/

0

精彩评论

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