Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • cellframe/python-cellframe
1 result
Show changes
Commits on Source (2)
build/* # Импортируем модуль os
example/tmp import os
example/var # Импортируем модуль sys
*.text import sys
_skbuild/ while True:
.pybuild/ # Принимаем имя переменной среды
dist/ key_value = input(«Enter the key of the environment variable:»)
CellFrame.egg-info/ # Проверяем, инициализирована ли переменная
debian/*.log try:
debian/*.debhelper if os.environ[key_value]:
debian/*.substvars print(«The value of», key_value, » is «, os.environ[key_value])
debian/python3-cellframe-doc/ # Если переменной не присвоено значение, то ошибка
debian/python3-cellframe/ except KeyError:
debian/files print(key_value, ‘environment variable is not set.’)
*.text # Завершаем процесс выполнения скрипта
CMakeLists.txt.user* sys.exit(1)
\ No newline at end of file
...@@ -27,6 +27,10 @@ int dap_chain_plugins_init(dap_config_t *a_config){ ...@@ -27,6 +27,10 @@ int dap_chain_plugins_init(dap_config_t *a_config){
return -1; return -1;
} }
PyImport_AppendInittab("API_CellFrame", PyInit_libCellFrame); 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(); Py_Initialize();
PyEval_InitThreads(); PyEval_InitThreads();
PyObject *l_sys_module = PyImport_ImportModule("sys"); PyObject *l_sys_module = PyImport_ImportModule("sys");
......