Skip to content

Commit

Permalink
Fixed os_sys example
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasVousten committed Sep 16, 2024
1 parent cf9b8de commit 2027605
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/os_sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn main() -> pyo3::PyResult<()> {
// Get the current working directory via "os" Python module
let current_dir = os::getcwd(py)?;
// Get the relative path to the Python executable via "posixpath" Python module
let relpath_to_python_exe = posixpath::relpath(py, python_exe_path, current_dir)?;
let relpath_to_python_exe = posixpath::relpath(py, python_exe_path, Some(current_dir))?;

println!("Relative path to Python executable: '{relpath_to_python_exe}'");
Ok(())
Expand Down

0 comments on commit 2027605

Please sign in to comment.