let say the path is Desktop\Chem\test.png i want to print the name of the file without the .png this is my code
def test():
file=pickAFile()
shortFile=getShortPath(file)
end = shortFile.split('\\')[1]
print"this is a",end
so the solution would be "this is a test" instead of "this is a test.png"