| 286 | } |
| 287 | |
| 288 | void executePythonRepl(ScriptEngineInstance& pythonEngine) { |
| 289 | const std::string cmd = R"python( |
| 290 | import readline # optional, will allow Up/Down/History in the console |
| 291 | import code |
| 292 | variables = globals().copy() |
| 293 | variables.update(locals()) |
| 294 | shell = code.InteractiveConsole(variables) |
| 295 | shell.interact() |
| 296 | )python"; |
| 297 | pythonEngine->exec(cmd); |
| 298 | } |
| 299 | |
| 300 | void executePipListCommand(ScriptEngineInstance& pythonEngine) { |
| 301 | // TODO: seems like the CLI is picking up your virtualenvironment, so we manipulate sys.path to keep only the E+ folder for now |