eric7/DebugClients/Python/DebugClientBase.py

branch
eric7
changeset 8568
890dfe038613
parent 8549
15eca21fd968
child 8573
77845f40ebfe
equal deleted inserted replaced
8557:17fb004af51d 8568:890dfe038613
25 25
26 import DebugClientCapabilities 26 import DebugClientCapabilities
27 import DebugVariables 27 import DebugVariables
28 from DebugBase import setRecursionLimit, printerr # __IGNORE_WARNING__ 28 from DebugBase import setRecursionLimit, printerr # __IGNORE_WARNING__
29 from AsyncFile import AsyncFile, AsyncPendingWrite 29 from AsyncFile import AsyncFile, AsyncPendingWrite
30 from DebugConfig import ConfigQtNames, SpecialAttributes 30 from DebugConfig import SpecialAttributes, NonExpandableTypes
31 from FlexCompleter import Completer 31 from FlexCompleter import Completer
32 from DebugUtilities import prepareJsonCommand 32 from DebugUtilities import prepareJsonCommand
33 from BreakpointWatch import Breakpoint, Watch 33 from BreakpointWatch import Breakpoint, Watch
34 from MultiProcessDebugExtension import patchNewProcessFunctions 34 from MultiProcessDebugExtension import patchNewProcessFunctions
35 35
124 <b>Note</b>: This class is meant to be subclassed by individual 124 <b>Note</b>: This class is meant to be subclassed by individual
125 DebugClient classes. Do not instantiate it directly. 125 DebugClient classes. Do not instantiate it directly.
126 """ 126 """
127 clientCapabilities = DebugClientCapabilities.HasAll 127 clientCapabilities = DebugClientCapabilities.HasAll
128 128
129 # keep these in sync with VariablesViewer.VariableItem.Indicators 129 Type2Indicators = {
130 Indicators = ("()", "[]", "{:}", "{}") # __IGNORE_WARNING_M613__ 130 # Python types
131 arrayTypes = { 131 'list': '[]',
132 'list', 'tuple', 'dict', 'set', 'frozenset', "class 'dict_items'", 132 'tuple': '()',
133 "class 'dict_keys'", "class 'dict_values'" 133 'dict': '{:}', # __IGNORE_WARNING_M613__
134 'set': '{}', # __IGNORE_WARNING_M613__
135 'frozenset': '{}', # __IGNORE_WARNING_M613__
136 'numpy.ndarray': '[ndarray]', # __IGNORE_WARNING_M613__
137 'collections.abc.ItemsView': '[]',
138 'collections.abc.KeysView': '[]',
139 'collections.abc.ValuesView': '[]',
134 } 140 }
135 141
136 def __init__(self): 142 def __init__(self):
137 """ 143 """
138 Constructor 144 Constructor
149 self.debugMod.__dict__['__builtins__'] = __builtins__ 155 self.debugMod.__dict__['__builtins__'] = __builtins__
150 156
151 # The list of complete lines to execute. 157 # The list of complete lines to execute.
152 self.buffer = '' 158 self.buffer = ''
153 159
154 # The list of regexp objects to filter variables against 160 # The precompiled regexp to filter variables against
155 self.globalsFilterObjects = [] 161 self.globalsFilterObjects = None
156 self.localsFilterObjects = [] 162 self.localsFilterObjects = None
157 163
158 self._fncache = {} 164 self._fncache = {}
159 self.dircache = [] 165 self.dircache = []
160 self.passive = False # used to indicate the passive mode 166 self.passive = False # used to indicate the passive mode
161 self.running = None 167 self.running = None
1518 elif f.f_globals is f.f_locals: 1524 elif f.f_globals is f.f_locals:
1519 scope = -1 1525 scope = -1
1520 else: 1526 else:
1521 varDict = f.f_locals 1527 varDict = f.f_locals
1522 1528
1529 # Update known types list
1530 DebugVariables.updateTypeMap()
1531
1523 varlist = [] if scope < 0 else self.__formatVariablesList( 1532 varlist = [] if scope < 0 else self.__formatVariablesList(
1524 varDict, scope, filterList) 1533 varDict.items(), scope, filterList)
1525 1534
1526 self.sendJsonCommand("ResponseVariables", { 1535 self.sendJsonCommand("ResponseVariables", {
1527 "scope": scope, 1536 "scope": scope,
1528 "variables": varlist, 1537 "variables": varlist,
1529 }) 1538 })
1563 else: 1572 else:
1564 varDict = f.f_locals 1573 varDict = f.f_locals
1565 1574
1566 varlist = [] 1575 varlist = []
1567 1576
1577 # fast path if variable was looked up before (see elif)
1568 if scope != -1 and str(var) in self.resolverCache[scope]: 1578 if scope != -1 and str(var) in self.resolverCache[scope]:
1569 varGen = self.resolverCache[scope][str(var)] 1579 varGen = self.resolverCache[scope][str(var)]
1570 idx, varDict = next(varGen) 1580 idx, varDict = next(varGen)
1571 var.insert(0, idx) 1581 if idx != -2: # more elements available
1572 varlist = self.__formatVariablesList(varDict, scope, filterList) 1582 var.insert(0, idx)
1583 varlist = self.__formatVariablesList(
1584 varDict, scope, filterList)
1573 elif scope != -1: 1585 elif scope != -1:
1574 variable = varDict 1586 variable = varDict
1575 # Lookup the wanted attribute 1587 # Lookup the wanted attribute
1576 for attribute in var: 1588 for attribute in var:
1577 _, _, resolver = DebugVariables.getType(variable) 1589 resolver = DebugVariables.getResolver(variable)
1578 if resolver: 1590 if resolver:
1579 variable = resolver.resolve(variable, attribute) 1591 variable = resolver.resolve(variable, attribute)
1580 if variable is None: 1592 if variable is None:
1581 break 1593 break
1582 1594
1584 break 1596 break
1585 1597
1586 idx = -3 # Requested variable doesn't exist anymore 1598 idx = -3 # Requested variable doesn't exist anymore
1587 # If found, get the details of attribute 1599 # If found, get the details of attribute
1588 if variable is not None: 1600 if variable is not None:
1589 typeName, typeStr, resolver = DebugVariables.getType(variable) 1601 resolver = DebugVariables.getResolver(variable)
1590 if resolver: 1602 if resolver:
1591 varGen = resolver.getDictionary(variable) 1603 varGen = resolver.getVariableList(variable)
1604 # cache for next lookup
1592 self.resolverCache[scope][str(var)] = varGen 1605 self.resolverCache[scope][str(var)] = varGen
1593 1606
1594 idx, varDict = next(varGen) 1607 idx, varDict = next(varGen)
1595 varlist = self.__formatVariablesList( 1608 if idx != -2: # more elements available
1596 varDict, scope, filterList) 1609 varlist = self.__formatVariablesList(
1597 else: 1610 varDict, scope, filterList)
1598 # Gently handle exception which could occur as special
1599 # cases, e.g. already deleted C++ objects, str conversion..
1600 try:
1601 varlist = self.__formatQtVariable(variable, typeName)
1602 except Exception:
1603 varlist = []
1604 idx = -1
1605 1611
1606 var.insert(0, idx) 1612 var.insert(0, idx)
1607 1613
1608 self.sendJsonCommand("ResponseVariable", { 1614 self.sendJsonCommand("ResponseVariable", {
1609 "scope": scope, 1615 "scope": scope,
1610 "variable": var, 1616 "variable": var,
1611 "variables": varlist, 1617 "variables": varlist,
1612 }) 1618 })
1613 1619
1614 def __extractIndicators(self, var): 1620 def __formatVariablesList(self, variables, scope, filterList=None):
1615 """
1616 Private method to extract the indicator string from a variable text.
1617
1618 @param var variable text
1619 @type str
1620 @return tuple containing the variable text without indicators and the
1621 indicator string
1622 @rtype tuple of two str
1623 """
1624 for indicator in DebugClientBase.Indicators:
1625 if var.endswith(indicator):
1626 return var[:-len(indicator)], indicator
1627
1628 return var, ""
1629
1630 def __formatQtVariable(self, value, qttype):
1631 """
1632 Private method to produce a formatted output of a simple Qt5/Qt6 type.
1633
1634 @param value variable to be formatted
1635 @param qttype type of the Qt variable to be formatted (string)
1636 @return A tuple consisting of a list of formatted variables. Each
1637 variable entry is a tuple of three elements, the variable name,
1638 its type and value.
1639 """
1640 varlist = []
1641 if qttype == 'QChar':
1642 varlist.append(
1643 ("", "QChar", "{0}".format(chr(value.unicode()))))
1644 varlist.append(("", "int", "{0:d}".format(value.unicode())))
1645 elif qttype == 'QByteArray':
1646 varlist.append(
1647 ("bytes", "QByteArray", "{0}".format(bytes(value))[2:-1]))
1648 varlist.append(
1649 ("hex", "QByteArray", "{0}".format(value.toHex())[2:-1]))
1650 varlist.append(
1651 ("base64", "QByteArray", "{0}".format(value.toBase64())[2:-1]))
1652 varlist.append(("percent encoding", "QByteArray",
1653 "{0}".format(value.toPercentEncoding())[2:-1]))
1654 elif qttype == 'QString':
1655 varlist.append(("", "QString", "{0}".format(value)))
1656 elif qttype == 'QStringList':
1657 for i in range(value.count()):
1658 varlist.append(
1659 ("{0:d}".format(i), "QString", "{0}".format(value[i])))
1660 elif qttype == 'QPoint':
1661 varlist.append(("x", "int", "{0:d}".format(value.x())))
1662 varlist.append(("y", "int", "{0:d}".format(value.y())))
1663 elif qttype == 'QPointF':
1664 varlist.append(("x", "float", "{0:g}".format(value.x())))
1665 varlist.append(("y", "float", "{0:g}".format(value.y())))
1666 elif qttype == 'QRect':
1667 varlist.append(("x", "int", "{0:d}".format(value.x())))
1668 varlist.append(("y", "int", "{0:d}".format(value.y())))
1669 varlist.append(("width", "int", "{0:d}".format(value.width())))
1670 varlist.append(("height", "int", "{0:d}".format(value.height())))
1671 elif qttype == 'QRectF':
1672 varlist.append(("x", "float", "{0:g}".format(value.x())))
1673 varlist.append(("y", "float", "{0:g}".format(value.y())))
1674 varlist.append(("width", "float", "{0:g}".format(value.width())))
1675 varlist.append(("height", "float", "{0:g}".format(value.height())))
1676 elif qttype == 'QSize':
1677 varlist.append(("width", "int", "{0:d}".format(value.width())))
1678 varlist.append(("height", "int", "{0:d}".format(value.height())))
1679 elif qttype == 'QSizeF':
1680 varlist.append(("width", "float", "{0:g}".format(value.width())))
1681 varlist.append(("height", "float", "{0:g}".format(value.height())))
1682 elif qttype == 'QColor':
1683 varlist.append(("name", "str", "{0}".format(value.name())))
1684 r, g, b, a = value.getRgb()
1685 varlist.append(
1686 ("rgba", "int",
1687 "{0:d}, {1:d}, {2:d}, {3:d}".format(r, g, b, a)))
1688 h, s, v, a = value.getHsv()
1689 varlist.append(
1690 ("hsva", "int",
1691 "{0:d}, {1:d}, {2:d}, {3:d}".format(h, s, v, a)))
1692 c, m, y, k, a = value.getCmyk()
1693 varlist.append(
1694 ("cmyka", "int",
1695 "{0:d}, {1:d}, {2:d}, {3:d}, {4:d}".format(c, m, y, k, a)))
1696 elif qttype == 'QDate':
1697 varlist.append(("", "QDate", "{0}".format(value.toString())))
1698 elif qttype == 'QTime':
1699 varlist.append(("", "QTime", "{0}".format(value.toString())))
1700 elif qttype == 'QDateTime':
1701 varlist.append(("", "QDateTime", "{0}".format(value.toString())))
1702 elif qttype == 'QDir':
1703 varlist.append(("path", "str", "{0}".format(value.path())))
1704 varlist.append(("absolutePath", "str",
1705 "{0}".format(value.absolutePath())))
1706 varlist.append(("canonicalPath", "str",
1707 "{0}".format(value.canonicalPath())))
1708 elif qttype == 'QFile':
1709 varlist.append(("fileName", "str", "{0}".format(value.fileName())))
1710 elif qttype == 'QFont':
1711 varlist.append(("family", "str", "{0}".format(value.family())))
1712 varlist.append(
1713 ("pointSize", "int", "{0:d}".format(value.pointSize())))
1714 varlist.append(("weight", "int", "{0:d}".format(value.weight())))
1715 varlist.append(("bold", "bool", "{0}".format(value.bold())))
1716 varlist.append(("italic", "bool", "{0}".format(value.italic())))
1717 elif qttype == 'QUrl':
1718 varlist.append(("url", "str", "{0}".format(value.toString())))
1719 varlist.append(("scheme", "str", "{0}".format(value.scheme())))
1720 varlist.append(("user", "str", "{0}".format(value.userName())))
1721 varlist.append(("password", "str", "{0}".format(value.password())))
1722 varlist.append(("host", "str", "{0}".format(value.host())))
1723 varlist.append(("port", "int", "{0:d}".format(value.port())))
1724 varlist.append(("path", "str", "{0}".format(value.path())))
1725 elif qttype == 'QModelIndex':
1726 varlist.append(("valid", "bool", "{0}".format(value.isValid())))
1727 if value.isValid():
1728 varlist.append(("row", "int", "{0}".format(value.row())))
1729 varlist.append(("column", "int", "{0}".format(value.column())))
1730 varlist.append(
1731 ("internalId", "int", "{0}".format(value.internalId())))
1732 varlist.append(("internalPointer", "void *",
1733 "{0}".format(value.internalPointer())))
1734 elif qttype in ('QRegExp', "QRegularExpression"):
1735 varlist.append(("pattern", "str", "{0}".format(value.pattern())))
1736
1737 # GUI stuff
1738 elif qttype == 'QAction':
1739 varlist.append(("name", "str", "{0}".format(value.objectName())))
1740 varlist.append(("text", "str", "{0}".format(value.text())))
1741 varlist.append(
1742 ("icon text", "str", "{0}".format(value.iconText())))
1743 varlist.append(("tooltip", "str", "{0}".format(value.toolTip())))
1744 varlist.append(
1745 ("whatsthis", "str", "{0}".format(value.whatsThis())))
1746 varlist.append(
1747 ("shortcut", "str",
1748 "{0}".format(value.shortcut().toString())))
1749 elif qttype == 'QKeySequence':
1750 varlist.append(("value", "", "{0}".format(value.toString())))
1751
1752 # XML stuff
1753 elif qttype == 'QDomAttr':
1754 varlist.append(("name", "str", "{0}".format(value.name())))
1755 varlist.append(("value", "str", "{0}".format(value.value())))
1756 elif qttype in ('QDomCharacterData', 'QDomComment', 'QDomText'):
1757 varlist.append(("data", "str", "{0}".format(value.data())))
1758 elif qttype == 'QDomDocument':
1759 varlist.append(("text", "str", "{0}".format(value.toString())))
1760 elif qttype == 'QDomElement':
1761 varlist.append(("tagName", "str", "{0}".format(value.tagName())))
1762 varlist.append(("text", "str", "{0}".format(value.text())))
1763
1764 # Networking stuff
1765 elif qttype == 'QHostAddress':
1766 varlist.append(
1767 ("address", "QHostAddress", "{0}".format(value.toString())))
1768
1769 # PySide specific
1770 elif qttype == 'EnumType': # Not in PyQt possible
1771 for key, value in value.values.items():
1772 varlist.append((key, qttype, "{0}".format(int(value))))
1773
1774 return varlist
1775
1776 def __formatVariablesList(self, dict_, scope, filterList=None):
1777 """ 1621 """
1778 Private method to produce a formated variables list. 1622 Private method to produce a formated variables list.
1779 1623
1780 The dictionary passed in to it is scanned. Variables are 1624 The dictionary passed in to it is scanned. Variables are
1781 only added to the list, if their type is not contained 1625 only added to the list, if their type is not contained
1797 @return A tuple consisting of a list of formatted variables. Each 1641 @return A tuple consisting of a list of formatted variables. Each
1798 variable entry is a tuple of three elements, the variable name, 1642 variable entry is a tuple of three elements, the variable name,
1799 its type and value. 1643 its type and value.
1800 @rtype list of tuple of (str, str, str) 1644 @rtype list of tuple of (str, str, str)
1801 """ 1645 """
1802 filterList = [] if filterList is None else filterList[:] 1646 filterList = set(filterList or [])
1803 1647
1804 varlist = [] 1648 varlist = []
1805 patternFilterObjects = ( 1649 patternFilterObjects = (
1806 self.globalsFilterObjects 1650 self.globalsFilterObjects
1807 if scope else 1651 if scope else
1808 self.localsFilterObjects 1652 self.localsFilterObjects
1809 ) 1653 )
1810 if type(dict_) == dict: 1654
1811 dict_ = dict_.items() 1655 for variabel in variables:
1812 1656 valtype = None
1813 for key, value in dict_: 1657 rvalue = None
1814 # no more elements available 1658 try:
1815 if key == -2: 1659 key, value = variabel
1816 break 1660 except ValueError:
1661 # Special case for some Qt variables, where the real type is
1662 # overwritten
1663 key, valtype, rvalue = variabel
1817 1664
1818 # filter based on the filter pattern 1665 # filter based on the filter pattern
1819 matched = False 1666 if patternFilterObjects and patternFilterObjects.match(str(key)):
1820 for pat in patternFilterObjects:
1821 if pat.match(str(key)):
1822 matched = True
1823 break
1824 if matched:
1825 continue 1667 continue
1826 1668
1827 # filter hidden attributes (filter #0) 1669 # filter hidden attributes (filter #0)
1828 if '__' in filterList and str(key)[:2] == '__': 1670 if '__' in filterList and str(key)[:2] == '__':
1829 continue 1671 continue
1830 1672
1673 hasChildren = False
1831 # special handling for '__builtins__' (it's way too big) 1674 # special handling for '__builtins__' (it's way too big)
1832 if key == '__builtins__': 1675 if key == '__builtins__':
1833 rvalue = '<module builtins (built-in)>' 1676 rvalue = '<module builtins (built-in)>'
1834 valtype = 'module' 1677 valtype = 'module'
1835 if valtype in filterList: 1678 if valtype in filterList:
1839 "special_attributes" in filterList) or 1682 "special_attributes" in filterList) or
1840 (key == "__hash__" and 1683 (key == "__hash__" and
1841 "builtin_function_or_method" in filterList) 1684 "builtin_function_or_method" in filterList)
1842 ): 1685 ):
1843 continue 1686 continue
1844 else: 1687 elif valtype is None:
1845 isQt = False
1846 # valtypestr, e.g. class 'PyQt6.QtCore.QPoint' 1688 # valtypestr, e.g. class 'PyQt6.QtCore.QPoint'
1847 valtypestr = str(type(value))[1:-1] 1689 valtypestr = str(type(value))
1848 _, valtype = valtypestr.split(' ', 1) 1690 _, valtype = valtypestr.split(' ', 1)
1849 # valtype, e.g. PyQt6.QtCore.QPoint 1691 # valtype is the real type, e.g. PyQt6.QtCore.QPoint
1850 valtype = valtype[1:-1] 1692 # valtype_filter is used for filtering, where the base class is
1693 # also important
1694 valtype = valtype_filter = valtype[1:-2]
1851 # Strip 'instance' to be equal with Python 3 1695 # Strip 'instance' to be equal with Python 3
1852 if valtype == "instancemethod": 1696 if valtype == "instancemethod":
1853 valtype = "method" 1697 valtype = valtype_filter = "method"
1854 elif valtype in ("type", "classobj"): 1698 elif isinstance(value, type):
1855 valtype = "class" 1699 valtype_filter = "class"
1700 if valtype == "type":
1701 valtype = "class"
1856 elif valtype == "method-wrapper": 1702 elif valtype == "method-wrapper":
1857 valtype = "builtin_function_or_method" 1703 valtype = valtype_filter = "builtin_function_or_method"
1858 1704
1859 # valtypename, e.g. QPoint 1705 # Don't process variables which types are on filter list
1860 valtypename = type(value).__name__
1861 if ( 1706 if (
1862 valtype in filterList or 1707 valtype_filter in filterList or
1863 (valtype in ("sip.enumtype", "sip.wrappertype") and 1708 (valtype_filter in ("sip.enumtype", "sip.wrappertype") and
1864 'class' in filterList) or 1709 'class' in filterList) or
1865 (valtype in ( 1710 (valtype_filter in (
1866 "sip.methoddescriptor", "method_descriptor") and 1711 "sip.methoddescriptor", "method_descriptor") and
1867 'method' in filterList) or 1712 'method' in filterList) or
1868 (valtype in ("numpy.ndarray", "array.array") and 1713 (valtype_filter in ("numpy.ndarray", "array.array") and
1869 'list' in filterList) or 1714 'list' in filterList) or
1870 (valtypename == "MultiValueDict" and 1715 (valtype_filter == "django.MultiValueDict" and
1871 'dict' in filterList) or 1716 'dict' in filterList) or
1872 'instance' in filterList 1717 'instance' in filterList
1873 ): 1718 ):
1874 continue 1719 continue
1720
1721 length = -2
1722 indicator = ''
1723
1724 if valtype == 'str':
1725 rvalue = repr(value)
1726 length = len(rvalue)
1727 elif valtype in NonExpandableTypes:
1728 rvalue = repr(value)
1729
1730 if rvalue is not None:
1731 varlist.append(
1732 (key, indicator, valtype, hasChildren, length, rvalue)
1733 )
1734 continue
1735
1736 try:
1737 for dtype in DebugVariables._ArrayTypes:
1738 if isinstance(value, dtype):
1739 try:
1740 length = len(value)
1741 except TypeError:
1742 length = -1 # Uninitialized array
1743
1744 dtype = str(dtype)[8:-2]
1745 # Standard array type indicators
1746 indicator = self.Type2Indicators.get(dtype, '')
1747
1748 # Special handling of some array types
1749 if valtype == 'array.array':
1750 indicator = '[<{0}>]'.format(value.typecode)
1751 elif valtype == 'collections.defaultdict':
1752 if value.default_factory is None:
1753 def_factory = "None"
1754 else:
1755 def_factory = value.default_factory.__name__
1756 indicator = '{{:<{0}>}}'.format(def_factory)
1757 elif valtype == "numpy.ndarray" and length > -1:
1758 length = "x".join(str(x) for x in value.shape)
1759 elif valtype.endswith(".MultiValueDict"):
1760 indicator = "{:}"
1761 valtype = "django.MultiValueDict" # shortened type
1762 break
1763 else:
1764 rvalue = repr(value)
1875 1765
1876 isQt = valtype.startswith(ConfigQtNames) 1766 hasChildren = True
1877 1767 except Exception:
1878 try: 1768 rvalue = ''
1879 if valtype in self.arrayTypes: 1769
1880 rvalue = "{0:d}".format(len(value)) 1770 varlist.append(
1881 elif valtype == 'array.array': 1771 (key, indicator, valtype, hasChildren, length, rvalue)
1882 rvalue = "{0:d}|{1}".format( 1772 )
1883 len(value), value.typecode)
1884 elif valtype == 'collections.defaultdict':
1885 if value.default_factory is None:
1886 factoryName = "None"
1887 else:
1888 factoryName = value.default_factory.__name__
1889 rvalue = "{0:d}|{1}".format(len(value), factoryName)
1890 elif valtype == "numpy.ndarray":
1891 rvalue = "x".join(str(x) for x in value.shape)
1892 elif valtypename == "MultiValueDict":
1893 rvalue = "{0:d}".format(len(value.keys()))
1894 valtype = "django.MultiValueDict" # shortened type
1895 else:
1896 rvalue = repr(value)
1897 if valtype.startswith('class') and rvalue[0] in '{([':
1898 rvalue = ""
1899 elif (isQt and rvalue.startswith("<class '")):
1900 rvalue = rvalue[8:-2]
1901 except Exception:
1902 rvalue = ''
1903
1904 varlist.append((key, valtype, rvalue))
1905 1773
1906 return varlist 1774 return varlist
1907 1775
1908 def __generateFilterObjects(self, scope, filterString): 1776 def __generateFilterObjects(self, scope, filterString):
1909 """ 1777 """
1911 1779
1912 @param scope 1 to generate filter for global variables, 0 for local 1780 @param scope 1 to generate filter for global variables, 0 for local
1913 variables (int) 1781 variables (int)
1914 @param filterString string of filter patterns separated by ';' 1782 @param filterString string of filter patterns separated by ';'
1915 """ 1783 """
1916 patternFilterObjects = [] 1784 patternFilterObjects = None
1917 for pattern in filterString.split(';'): 1785 if filterString.strip():
1918 patternFilterObjects.append(re.compile('^{0}$'.format(pattern))) 1786 pattern = filterString.replace(';', '|')
1787 try:
1788 patternFilterObjects = re.compile(pattern)
1789 except re.error:
1790 pass
1791
1919 if scope: 1792 if scope:
1920 self.globalsFilterObjects = patternFilterObjects[:] 1793 self.globalsFilterObjects = patternFilterObjects
1921 else: 1794 else:
1922 self.localsFilterObjects = patternFilterObjects[:] 1795 self.localsFilterObjects = patternFilterObjects
1923 1796
1924 def __completionList(self, text): 1797 def __completionList(self, text):
1925 """ 1798 """
1926 Private slot to handle the request for a commandline completion list. 1799 Private slot to handle the request for a commandline completion list.
1927 1800

eric ide

mercurial