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
import os,urllib2 resp = urllib2.urlopen('http://www.example.com/index.html') my_url = resp.geturl() os.path.split(my_url)[1] # 'index.html'
This is not openfile, but maybe still helps :)