Skip to content

Commit

Permalink
Up
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatanklosko committed Feb 21, 2025
1 parent 70864b0 commit da1a394
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions c_src/pythonx/pythonx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ fine::Ok<> init(ErlNifEnv *env, std::string python_dl_path,
//
// [1]: https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHOME
// Py_SetPythonHome(python_home_path_w.c_str());

Py_SetProgramName(python_executable_path_w.c_str());

Py_InitializeEx(0);
Expand Down Expand Up @@ -300,14 +299,14 @@ fine::Ok<> init(ErlNifEnv *env, std::string python_dl_path,
raise_if_failed(env, py_sys_path);
auto py_sys_path_guard = PyDecRefGuard(py_sys_path);

for (const auto &path : sys_paths) {
auto py_path = PyUnicode_FromStringAndSize(
reinterpret_cast<const char *>(path.data), path.size);
raise_if_failed(env, py_path);
auto py_path_guard = PyDecRefGuard(py_path);
// for (const auto &path : sys_paths) {
// auto py_path = PyUnicode_FromStringAndSize(
// reinterpret_cast<const char *>(path.data), path.size);
// raise_if_failed(env, py_path);
// auto py_path_guard = PyDecRefGuard(py_path);

raise_if_failed(env, PyList_Append(py_sys_path, py_path));
}
// raise_if_failed(env, PyList_Append(py_sys_path, py_path));
// }

// Define global stdout and stdin overrides

Expand Down

0 comments on commit da1a394

Please sign in to comment.