| 150 | EmbeddedPython::~EmbeddedPython() { finalize(); } |
| 151 | |
| 152 | void EmbeddedPython::disconnect() { |
| 153 | |
| 154 | try { |
| 155 | exec(R"( |
| 156 | if 'XSTUDIO' in globals(): |
| 157 | XSTUDIO.disconnect() |
| 158 | del XSTUDIO |
| 159 | )"); |
| 160 | } catch (const std::exception &err) { |
| 161 | spdlog::warn("{} Failed to disconnect API : {} ", __PRETTY_FUNCTION__, err.what()); |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | bool EmbeddedPython::connect(const int port) { |
| 166 | try { |