import os os.path.dirname(os.path.realpath(__file__))
import os basename, ext = os.path.splitext('inputfile.txt')