From 8551ccb74fa0c09b582b094fe550b99a351d1fe6 Mon Sep 17 00:00:00 2001 From: Dmitry Trofimov Date: Tue, 19 Nov 2013 17:59:23 +0100 Subject: [PATCH] Jython doesn't support 'exec' symbol in interactive console. --- python/helpers/pydev/pydevconsole.py | 5 +++-- python/helpers/pydev/pydevd_constants.py | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/python/helpers/pydev/pydevconsole.py b/python/helpers/pydev/pydevconsole.py index 5bac7550c86d..a15fd83bc94c 100644 --- a/python/helpers/pydev/pydevconsole.py +++ b/python/helpers/pydev/pydevconsole.py @@ -10,6 +10,7 @@ import os import sys from pydevd_constants import USE_LIB_COPY +from pydevd_constants import IS_JYTHON if USE_LIB_COPY: import _pydev_threading as threading @@ -86,10 +87,10 @@ class Command: @staticmethod def symbol_for_fragment(code_fragment): - if code_fragment.is_single_line: + if IS_JYTHON or code_fragment.is_single_line: symbol = 'single' else: - symbol = 'exec' + symbol = 'exec' # Jython doesn't support this return symbol def run(self): diff --git a/python/helpers/pydev/pydevd_constants.py b/python/helpers/pydev/pydevd_constants.py index 34759f7f999d..5e78e15d3a19 100644 --- a/python/helpers/pydev/pydevd_constants.py +++ b/python/helpers/pydev/pydevd_constants.py @@ -41,6 +41,10 @@ MAXIMUM_VARIABLE_REPRESENTATION_SIZE = 1000 import os +import pydevd_vm_type + +IS_JYTHON = pydevd_vm_type.GetVmType() == pydevd_vm_type.PydevdVmType.JYTHON + #======================================================================================================================= # Python 3? #=======================================================================================================================