Comparison: HTTP with Java, Perl or Python

Fredrik Lundh fredrik at pythonware.com
Sat Jun 8 18:30:41 CEST 2002


Ingo Linkweiler wrote:
> for a comparison of languages I need a complete "translation"
> of this short skript into Perl, Tcl and Java:
>
>  myurl = "http://www.uni-dortmund.de"
>  import urllib
>  file  = urllib.urlopen(myurl)
>  text  = file.read()
>  file.close()
>  print text

here's a Python version:

    import urllib
    MYURL = "http://www.uni-dortmund.de"
    print urllib.urlopen(MYURL).read()

</F>





More information about the Python-list mailing list