Codes are as follows:
# Get the absolute path of the file Import OS class getPath: DEF get_path (Self, path): R & lt = os.path.abspath with (path) return R & lt IF the __name__ == ' __main__ ' : A . GetPath = () get_path ( ' ./ get_getpath.py ' ) Print (A)