If I open a file using urllib2, like so:
remotefile = urllib2.urlopen(\'http://example.com/somefile.zip\')
Is there an easy way to get the
Using urlsplit is the safest option:
urlsplit
url = 'http://example.com/somefile.zip' urlparse.urlsplit(url).path.split('/')[-1]