Get only the filename part of a string without the need to use os.path.splitext


def get_filename(path):
return path[:path.rfind('.')]

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/URHkW9c3tZE/13279