Python Get Base Directory
import os
os.path.dirname(os.path.realpath(__file__))
Seluj78
import os
os.path.dirname(os.path.realpath(__file__))
import os
basename, ext = os.path.splitext('inputfile.txt')