Re: python et le web

Pàgina inicial

Reply to this message
Autor: Frédéric Mantegazza
Data:  
A: guilde
Assumptes vells: Re: python
Assumpte: Re: python et le web
Anne, ce module peut sûrement t'intéresser :

-----------------------------------------------------

http://wwwsearch.sourceforge.net/ClientForm/

Requires Python >= 1.5.2. Works with Python 2.4.

ClientForm is a Python module for handling HTML forms on the client
side, useful for parsing HTML forms, filling them in and returning the
completed forms to the server. It has developed from a port of Gisle
Aas' Perl module HTML::Form, from the libwww-perl library, but the
interface is not the same.

Simple example:

from urllib2 import urlopen
from ClientForm import ParseResponse

forms = ParseResponse(urlopen("http://www.example.com/form.html"))
form = forms[0]
print form
form["author"] = "Gisle Aas"

# form.click returns a urllib2.Request object
# (see HTMLForm.click_request_data.__doc__ if you're not using urllib2)
response = urlopen(form.click("Thanks"))

--------------------------------------------------------------------------

Sinon, regarde aussi du côté de CherryPy, qui permet de faire un serveur Web
autonome hyper simple :

    http://www.cherrypy.org


En plus évolué, il y a Snakelets :

    http://snakelets.sourceforge.net


Ce dernier est développé par la même personne qui fait Pyro, le serveur
d'objet que nous utilisons est qui est vraiment très très bien fait. Je
suppose donc que Snakelets est aussi quelque chose de bien abouti. Dès que
j'ai le temps, je m'y plonge.

Tout dépend de ce que tu veux faire...

--
Frédéric