>>> os.path.basename('http://example.com/file.txt')
'file.txt'

.. and I thought os.path.* work only on local paths and not URLs? Note that the above example was run on Windows too .. with similar result.

Edit
Report