Comparison: HTTP with Java, Perl or Python

damien morton morton at dennisinter.com
Sat Jun 8 13:41:28 EDT 2002


Ingo Linkweiler <i.linkweiler at gmx.de> wrote in message news:<3D009911.9000904 at gmx.de>...
> Hello,
> 
> 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
> 
> Can you send me some solutions?
> The skripts must be able to run, please do not post "partial" solutions.
> 
> Ingo


Your python code could be a whole lot shorter:

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



More information about the Python-list mailing list