mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Can't saw script output with Remote Interpreter and "Show command line afterwards" option (PY-21426)
This commit is contained in:
@@ -419,9 +419,10 @@ class BaseInterpreterInterface:
|
||||
|
||||
server = property(get_server)
|
||||
|
||||
def show_console(self):
|
||||
def ShowConsole(self):
|
||||
server = self.get_server()
|
||||
server.ShowConsole()
|
||||
if server is not None:
|
||||
server.ShowConsole()
|
||||
|
||||
def finish_exec(self, more):
|
||||
self.interruptable = False
|
||||
|
||||
@@ -79,6 +79,6 @@ if __name__ == '__main__':
|
||||
|
||||
interpreter.get_namespace().update(globals)
|
||||
|
||||
interpreter.show_console()
|
||||
interpreter.ShowConsole()
|
||||
|
||||
process_exec_queue(interpreter)
|
||||
@@ -314,6 +314,7 @@ def start_console_server(host, port, interpreter):
|
||||
server.register_function(interpreter.hello)
|
||||
server.register_function(interpreter.getArray)
|
||||
server.register_function(interpreter.evaluate)
|
||||
server.register_function(interpreter.ShowConsole)
|
||||
|
||||
# Functions for GUI main loop integration
|
||||
server.register_function(interpreter.enableGui)
|
||||
|
||||
@@ -420,6 +420,10 @@ public class PydevConsoleRunnerImpl implements PydevConsoleRunner {
|
||||
}
|
||||
}
|
||||
|
||||
protected String getRunnerFileFromHelpers() {
|
||||
return PYDEV_PYDEVCONSOLE_PY;
|
||||
}
|
||||
|
||||
private RemoteProcess createRemoteConsoleProcess(PythonRemoteInterpreterManager manager,
|
||||
String[] command,
|
||||
Map<String, String> env,
|
||||
@@ -437,7 +441,7 @@ public class PydevConsoleRunnerImpl implements PydevConsoleRunner {
|
||||
commandLine.getEnvironment().putAll(env);
|
||||
|
||||
commandLine.getParametersList().set(0, PythonRemoteInterpreterManager.toSystemDependent(new File(data.getHelpersPath(),
|
||||
PYDEV_PYDEVCONSOLE_PY)
|
||||
getRunnerFileFromHelpers())
|
||||
.getPath(),
|
||||
PySourcePosition.isWindowsPath(
|
||||
data.getInterpreterPath())
|
||||
|
||||
@@ -117,6 +117,7 @@ public class PythonScriptCommandLineState extends PythonCommandLineState {
|
||||
public class PythonScriptWithConsoleRunner extends PydevConsoleRunnerImpl {
|
||||
|
||||
private CommandLinePatcher[] myPatchers;
|
||||
private String PYDEV_RUN_IN_CONSOLE_PY = "pydev/pydev_run_in_console.py";
|
||||
|
||||
public PythonScriptWithConsoleRunner(@NotNull Project project,
|
||||
@NotNull Sdk sdk,
|
||||
@@ -137,6 +138,10 @@ public class PythonScriptCommandLineState extends PythonCommandLineState {
|
||||
registerActionShortcuts(Lists.newArrayList(a), getConsoleView().getConsoleEditor().getComponent());
|
||||
}
|
||||
|
||||
protected String getRunnerFileFromHelpers() {
|
||||
return PYDEV_RUN_IN_CONSOLE_PY;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected GeneralCommandLine createCommandLine(@NotNull Sdk sdk,
|
||||
@NotNull Map<String, String> environmentVariables,
|
||||
|
||||
Reference in New Issue
Block a user