Python: Read a file (from an external server)
Question: Can you tell me how to code a Python script which reads a file from an
external server? I look for something similar to PHP's file_get_contents() or
file() function.

It would be great if someone could post the entire code for such a script.

Thanks in advance!


Answer: The entire script is:

    
    
    import urllib
    content = urllib.urlopen('http://www.google.com/').read()
    

