• [^] # Re: pourquoi j'ai choisi python...

    Posté par . En réponse au journal Python, langage de l'année pour la seconde année consécutive. Évalué à 1.

    >> import urllib
    >> import BeautifulSoup
    >>
    >> html = urllib.urlopen('http://www.vmspython.org').read()
    >>
    >> s = BeautifulSoup.BeautifulSoup()
    >> s.feed(html)
    >>
    >> for i in s('a'):
    >> try:
    >> print i['href']
    >> except:
    >> pass

    Mouais...en REBOL ça donne :

    parse read http://www.vmspython.org [any [thru "A HREF=" copy link to ">" (print link)] to end]

    C'est à dire une seule ligne !