Skip to content

Commit cb3ae5f

Browse files
committed
set program_name to Python
1 parent 818ede0 commit cb3ae5f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

NatlinkSource/COM/appsupp.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,20 +197,19 @@ std::string DoPyConfig(void) {
197197
// set the python executable in the virtual environment
198198
status = PyConfig_SetString(&config, &config.executable, (python_env_path_W + L"\\Scripts\\python.exe").c_str());
199199
if (PyStatus_Exception(status)) {
200-
init_error = "PyConfig: failed to set executable\n";
200+
init_error = "Natlink: failed to set executable\n";
201201
goto exception;
202202
}
203203

204-
// const wchar_t python_env_path;
205-
status = PyConfig_SetString(&config, &config.program_name, python_env_path_W.c_str());
204+
status = PyConfig_SetString(&config, &(config.program_name), L"Python");
206205
if (PyStatus_Exception(status)) {
207-
init_error = "PyConfig: failed to set program_name\n";
206+
init_error = "Natlink: failed to set program_name\n";
208207
goto exception;
209208
}
210209

211210
status = Py_InitializeFromConfig(&config);
212211
if (PyStatus_Exception(status)) {
213-
init_error = "PyConfig: failed initialize from config\n";
212+
init_error = "Natlink: failed initialize from config\n";
214213
goto exception;
215214
}
216215

0 commit comments

Comments
 (0)