Returns the full path to a file located relative to the executable directory. This function is useful for locating files that reside in the same folder as the application executable.
An optional relative path (or filename) can be provided, which is appended to the base directory path.
planetcnc.get_path_exe() planetcnc.get_path_exe(str)
#! /usr/bin/env python import planetcnc # Get the full path for "Samples" relative to the executable's directory. samples_path = planetcnc.get_path_exe("Samples") print("Executable relative path:", samples_path ) # Get the executable directory itself. exe_dir = planetcnc.get_path_exe() print("Executable directory:", exe_dir)