def norm_case(filename): filename = os_normcase(filename) if IS_PY3K: return filename enc = getfilesystemencoding() return filename.decode(enc).lower().encode(enc)
'128': 'CMD_GET_BREAKPOINT_EXCEPTION', '129': 'CMD_STEP_CAUGHT_EXCEPTION', '130': 'CMD_SEND_CURR_EXCEPTION_TRACE', '501': 'CMD_VERSION', '502': 'CMD_RETURN', '901': 'CMD_ERROR', } MAX_IO_MSG_SIZE = 1000 #if the io is too big, we'll not send all (could make the debugger too non-responsive) #this number can be changed if there's need to do so VERSION_STRING = "1.1" from _pydev_filesystem_encoding import getfilesystemencoding file_system_encoding = getfilesystemencoding() #--------------------------------------------------------------------------------------------------- UTILITIES #======================================================================================================================= # PydevdLog #======================================================================================================================= def PydevdLog(level, *args): """ levels are: 0 most serious warnings/errors 1 warnings/significant events 2 informational trace """ if level <= DEBUG_TRACE_LEVEL: #yes, we can have errors printing if the console of the program has been finished (and we're still trying to print something)
import threading import traceback import warnings from _pydev_filesystem_encoding import getfilesystemencoding from pydev_imports import xmlrpclib, _queue Queue = _queue.Queue from pydevd_constants import * #This may happen in IronPython (in Python it shouldn't happen as there are #'fast' replacements that are used in xmlrpclib.py) warnings.filterwarnings( 'ignore', 'The xmllib module is obsolete.*', DeprecationWarning) file_system_encoding = getfilesystemencoding() #======================================================================================================================= # _ServerHolder #======================================================================================================================= class _ServerHolder: ''' Helper so that we don't have to use a global here. ''' SERVER = None #======================================================================================================================= # SetServer #======================================================================================================================= def SetServer(server):