eric6/DebugClients/Python/DebugClientBase.py

changeset 8228
772103b14c18
parent 8221
0572a215bd2f
child 8230
8b5c6896655b
equal deleted inserted replaced
8227:349308e84eeb 8228:772103b14c18
1759 1759
1760 # XML stuff 1760 # XML stuff
1761 elif qttype == 'QDomAttr': 1761 elif qttype == 'QDomAttr':
1762 varlist.append(("name", "str", "{0}".format(value.name()))) 1762 varlist.append(("name", "str", "{0}".format(value.name())))
1763 varlist.append(("value", "str", "{0}".format(value.value()))) 1763 varlist.append(("value", "str", "{0}".format(value.value())))
1764 elif qttype == 'QDomCharacterData': 1764 elif qttype in ('QDomCharacterData', 'QDomComment', 'QDomText'):
1765 varlist.append(("data", "str", "{0}".format(value.data())))
1766 elif qttype == 'QDomComment':
1767 varlist.append(("data", "str", "{0}".format(value.data()))) 1765 varlist.append(("data", "str", "{0}".format(value.data())))
1768 elif qttype == 'QDomDocument': 1766 elif qttype == 'QDomDocument':
1769 varlist.append(("text", "str", "{0}".format(value.toString()))) 1767 varlist.append(("text", "str", "{0}".format(value.toString())))
1770 elif qttype == 'QDomElement': 1768 elif qttype == 'QDomElement':
1771 varlist.append(("tagName", "str", "{0}".format(value.tagName()))) 1769 varlist.append(("tagName", "str", "{0}".format(value.tagName())))
1772 varlist.append(("text", "str", "{0}".format(value.text()))) 1770 varlist.append(("text", "str", "{0}".format(value.text())))
1773 elif qttype == 'QDomText': 1771
1774 varlist.append(("data", "str", "{0}".format(value.data())))
1775
1776 # Networking stuff 1772 # Networking stuff
1777 elif qttype == 'QHostAddress': 1773 elif qttype == 'QHostAddress':
1778 varlist.append( 1774 varlist.append(
1779 ("address", "QHostAddress", "{0}".format(value.toString()))) 1775 ("address", "QHostAddress", "{0}".format(value.toString())))
1780 1776
1844 rvalue = '<module builtins (built-in)>' 1840 rvalue = '<module builtins (built-in)>'
1845 valtype = 'module' 1841 valtype = 'module'
1846 if valtype in filterList: 1842 if valtype in filterList:
1847 continue 1843 continue
1848 elif ( 1844 elif (
1849 key in SpecialAttributes and 1845 (key in SpecialAttributes and
1850 "special_attributes" in filterList 1846 "special_attributes" in filterList) or
1851 ): 1847 (key == "__hash__" and
1852 continue 1848 "builtin_function_or_method" in filterList)
1853 elif (
1854 key == "__hash__" and
1855 "builtin_function_or_method" in filterList
1856 ): 1849 ):
1857 continue 1850 continue
1858 else: 1851 else:
1859 isQt = False 1852 isQt = False
1860 # valtypestr, e.g. class 'PyQt5.QtCore.QPoint' 1853 # valtypestr, e.g. class 'PyQt5.QtCore.QPoint'
1870 elif valtype == "method-wrapper": 1863 elif valtype == "method-wrapper":
1871 valtype = "builtin_function_or_method" 1864 valtype = "builtin_function_or_method"
1872 1865
1873 # valtypename, e.g. QPoint 1866 # valtypename, e.g. QPoint
1874 valtypename = type(value).__name__ 1867 valtypename = type(value).__name__
1875 if valtype in filterList: 1868 if (
1876 continue 1869 valtype in filterList or
1877 elif ( 1870 (valtype in ("sip.enumtype", "sip.wrappertype") and
1878 valtype in ("sip.enumtype", "sip.wrappertype") and 1871 'class' in filterList) or
1879 'class' in filterList 1872 (valtype in (
1873 "sip.methoddescriptor", "method_descriptor") and
1874 'method' in filterList) or
1875 (valtype in ("numpy.ndarray", "array.array") and
1876 'list' in filterList) or
1877 (valtypename == "MultiValueDict" and
1878 'dict' in filterList) or
1879 'instance' in filterList
1880 ): 1880 ):
1881 continue
1882 elif (
1883 valtype in (
1884 "sip.methoddescriptor", "method_descriptor") and
1885 'method' in filterList
1886 ):
1887 continue
1888 elif (
1889 valtype in ("numpy.ndarray", "array.array") and
1890 'list' in filterList
1891 ):
1892 continue
1893 elif valtypename == "MultiValueDict" and 'dict' in filterList:
1894 continue
1895 elif 'instance' in filterList:
1896 continue 1881 continue
1897 1882
1898 isQt = valtype.startswith(ConfigQtNames) 1883 isQt = valtype.startswith(ConfigQtNames)
1899 1884
1900 try: 1885 try:
2326 redirect = int(sys.argv[2]) 2311 redirect = int(sys.argv[2])
2327 except (ValueError, IndexError): 2312 except (ValueError, IndexError):
2328 redirect = True 2313 redirect = True
2329 2314
2330 ipOrHost = sys.argv[3] 2315 ipOrHost = sys.argv[3]
2331 if ':' in ipOrHost: 2316 if ':' in ipOrHost or ipOrHost[0] in '0123456789':
2332 # IPv6 address 2317 # IPv6 address or IPv4 address
2333 remoteAddress = ipOrHost
2334 elif ipOrHost[0] in '0123456789':
2335 # IPv4 address
2336 remoteAddress = ipOrHost 2318 remoteAddress = ipOrHost
2337 else: 2319 else:
2338 remoteAddress = self.__resolveHost(ipOrHost) 2320 remoteAddress = self.__resolveHost(ipOrHost)
2339 2321
2340 sys.argv = [''] 2322 sys.argv = ['']

eric ide

mercurial