get_path_working()

Returns the full path to a file or directory located relative to the current working directory of the process.

An optional relative path (or filename) can be provided, which is appended to the base temporary directory path.

Syntax

planetcnc.get_path_working()
planetcnc.get_path_working(str)

Parameters

Parameter Type Description
str string A string representing a relative subpath or filename.

Return Value

Examples

#! /usr/bin/env python 
 
import planetcnc
 
# Get the full path for "data.txt" relative to the current working directory.
full_path = planetcnc.get_path_working("data.txt")
print("Working directory file path:", full_path)
 
# Get the current working directory path.
working_dir = planetcnc.get_path_working()
print("Current working directory:", working_dir)

See also

get_path
get_path_exe
get_path_profile
get_path_temp
get_path_working