Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: website
Fetching contributors…

Cannot retrieve contributors at this time

executable file 23 lines (20 sloc) 0.482 kB
#!/usr/bin/env python
"""Download an URL and save it with tne name as the urlquoted url.
The files downloaded are used by the test suite.
"""
import os
import sys
from urllib import quote
from urllib2 import urlopen
if __name__ == '__main__':
url = sys.argv[1]
fn = quote(url, safe='')
f = open(fn, "wb")
try:
try:
f.write(urlopen(url).read())
finally:
f.close()
except Exception, e:
os.unlink(fn)
raise
Jump to Line
Something went wrong with that request. Please try again.