2 points · by inreverse · 3y ago · 1 comment
import os
os.path.dirname(os.path.abspath(__file__))
This will make sure that absolute path is taken for your file irrespective of the OS and solve the issue of file system when building multi-platform applications.