gsplot.path.path#
Functions
|
Returns the path to the user's home directory. |
|
Returns the current working directory. |
|
Retrieves the directory of the executed main file or the current working directory. |
|
Changes the current working directory to the value of pwd(). |
- home()[source]#
Returns the path to the userβs home directory.
This is a convenience function wrapping Path.get_home.
- Returns:
The absolute path to the home directory.
- Return type:
Examples
>>> import gsplot as gs >>> home_dir = gs.home() >>> print(home_dir) "/home/user" # Example output
- pwd()[source]#
Returns the current working directory.
This is a convenience function wrapping Path.get_pwd.
- Returns:
The absolute path of the current working directory.
- Return type:
Examples
>>> import gsplot as gs >>> current_dir = gs.pwd() >>> print(current_dir) "/home/user/project" # Example output
- pwd_main()[source]#
Retrieves the directory of the executed main file or the current working directory.
This function is a convenience wrapper around PathToMain.get_executed_file_dir.
- Returns:
The directory of the executed main file or the current working directory.
- Return type:
Examples
>>> import gsplot as gs >>> executed_dir = gs.pwd_main() >>> print(executed_dir) "/home/user/project" # Example output for an executed script