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
I think that "the file name" isn't a very well defined concept when it comes to http transfers. The server might (but is not required to) provide one as "content-disposition" header, you can try to get that with remotefile.headers['Content-Disposition']. If this fails, you probably have to parse the URI yourself.