Get filename from path without extension
>>> print os.path.splitext(os.path.basename("hemanth.txt"))[0]
hemanth
Updated less than a minute ago
Did this page help you?
>>> print os.path.splitext(os.path.basename("hemanth.txt"))[0]
hemanth
Updated less than a minute ago