Skip to content
Snippets Groups Projects
Commit b00a0b51 authored by Aleksandr Vodianov's avatar Aleksandr Vodianov Committed by Roman Khlopkov
Browse files

Hotfix 5526

parent 0c0b6ca9
No related branches found
No related tags found
1 merge request!74Hotfix 5526
build/*
example/tmp
example/var
*.text
_skbuild/
.pybuild/
dist/
CellFrame.egg-info/
debian/*.log
debian/*.debhelper
debian/*.substvars
debian/python3-cellframe-doc/
debian/python3-cellframe/
debian/files
*.text
CMakeLists.txt.user*
# Импортируем модуль os
import os
# Импортируем модуль sys
import sys
while True:
# Принимаем имя переменной среды
key_value = input(«Enter the key of the environment variable:»)
# Проверяем, инициализирована ли переменная
try:
if os.environ[key_value]:
print(«The value of», key_value, » is «, os.environ[key_value])
# Если переменной не присвоено значение, то ошибка
except KeyError:
print(key_value, ‘environment variable is not set.’)
# Завершаем процесс выполнения скрипта
sys.exit(1)
\ No newline at end of file
......@@ -27,6 +27,10 @@ int dap_chain_plugins_init(dap_config_t *a_config){
return -1;
}
PyImport_AppendInittab("API_CellFrame", PyInit_libCellFrame);
#ifdef DAP_BUILD_WITH_PYTHON_ENV
const wchar_t *l_python_env_path = L"/opt/cellframe-node/lib/python3.7";
Py_SetPath(l_python_env_path);
#endif
Py_Initialize();
PyEval_InitThreads();
PyObject *l_sys_module = PyImport_ImportModule("sys");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment