Show interactive plots when running "with Python console"
Put matplotlib import hook back before a file execution, because it's useful for data scientists. If it affects program execution, it can be easily disabled by other users.
@@ -4,8 +4,7 @@ Entry point module to run a file in the interactive console.
import os
import sys
import traceback
-from pydevconsole import do_exit, InterpreterInterface, process_exec_queue, start_console_server, init_set_return_control_back, \
- activate_mpl_if_already_imported
+from pydevconsole import InterpreterInterface, process_exec_queue, start_console_server, init_mpl_in_console
from _pydev_imps._pydev_saved_modules import threading, _queue
from _pydev_bundle import pydev_imports
@@ -137,7 +136,7 @@ if __name__ == '__main__':
sys.stdin = StdIn(interpreter, host, client_port, sys.stdin)
- init_set_return_control_back(interpreter)
+ init_mpl_in_console(interpreter)
try:
success = connect_status_queue.get(True, 60)
@@ -154,6 +153,4 @@ if __name__ == '__main__':
interpreter.ShowConsole()
- activate_mpl_if_already_imported(interpreter)
-
process_exec_queue(interpreter)
