Saturday, March 24, 2012

Python programming Day 04


#Return the content of the web page
#E.g. print get_page('http://www.monash.edu')
import urllib
def get_page(url):
    try:
        return urllib.urlopen(url).read()
    except:
        return ""

No comments:

Post a Comment

Mounting USB drives in Windows Subsystem for Linux

Windows Subsystem for Linux can use (mount): SD card USB drives CD drives (CDFS) Network drives UNC paths Local storage / drives Drives form...