mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Show interactive plots when running "with Python console" (PY-28448)
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user