string
The program printing the basename can be rewritten!
import string fileName="data.col" indexOfDot=string.find(fileName,".") print fileName[0:indexOfDot]
output:
data