137 if 'setrecursionlimit' in dir(sys): |
137 if 'setrecursionlimit' in dir(sys): |
138 DebugClientOrigSetRecursionLimit = sys.setrecursionlimit |
138 DebugClientOrigSetRecursionLimit = sys.setrecursionlimit |
139 sys.setrecursionlimit = DebugClientSetRecursionLimit |
139 sys.setrecursionlimit = DebugClientSetRecursionLimit |
140 DebugClientSetRecursionLimit(sys.getrecursionlimit()) |
140 DebugClientSetRecursionLimit(sys.getrecursionlimit()) |
141 |
141 |
142 ################################################################################ |
142 ############################################################################### |
143 |
143 |
144 |
144 |
145 class DebugClientBase(object): |
145 class DebugClientBase(object): |
146 """ |
146 """ |
147 Class implementing the client side of the debugger. |
147 Class implementing the client side of the debugger. |
148 |
148 |
149 It provides access to the Python interpeter from a debugger running in another |
149 It provides access to the Python interpeter from a debugger running in |
150 process whether or not the Qt event loop is running. |
150 another process whether or not the Qt event loop is running. |
151 |
151 |
152 The protocol between the debugger and the client assumes that there will be |
152 The protocol between the debugger and the client assumes that there will be |
153 a single source of debugger commands and a single source of Python |
153 a single source of debugger commands and a single source of Python |
154 statements. Commands and statement are always exactly one line and may be |
154 statements. Commands and statement are always exactly one line and may be |
155 interspersed. |
155 interspersed. |
158 debugger and then sends a series of one line commands. A command is either |
158 debugger and then sends a series of one line commands. A command is either |
159 >Load<, >Step<, >StepInto<, ... or a Python statement. |
159 >Load<, >Step<, >StepInto<, ... or a Python statement. |
160 See DebugProtocol.py for a listing of valid protocol tokens. |
160 See DebugProtocol.py for a listing of valid protocol tokens. |
161 |
161 |
162 A Python statement consists of the statement to execute, followed (in a |
162 A Python statement consists of the statement to execute, followed (in a |
163 separate line) by >OK?<. If the statement was incomplete then the response |
163 separate line) by >OK?<. If the statement was incomplete then the |
164 is >Continue<. If there was an exception then the response is |
164 response is >Continue<. If there was an exception then the response |
165 >Exception<. |
165 is >Exception<. Otherwise the response is >OK<. The reason |
166 Otherwise the response is >OK<. The reason for the >OK?< part is to |
166 for the >OK?< part is to provide a sentinal (ie. the responding |
167 provide a sentinal (ie. the responding >OK<) after any possible output as a |
167 >OK<) after any possible output as a result of executing the command. |
168 result of executing the command. |
|
169 |
168 |
170 The client may send any other lines at any other time which should be |
169 The client may send any other lines at any other time which should be |
171 interpreted as program output. |
170 interpreted as program output. |
172 |
171 |
173 If the debugger closes the session there is no response from the client. |
172 If the debugger closes the session there is no response from the client. |
174 The client may close the session at any time as a result of the script |
173 The client may close the session at any time as a result of the script |
175 being debugged closing or crashing. |
174 being debugged closing or crashing. |
176 |
175 |
177 <b>Note</b>: This class is meant to be subclassed by individual DebugClient classes. |
176 <b>Note</b>: This class is meant to be subclassed by individual |
178 Do not instantiate it directly. |
177 DebugClient classes. Do not instantiate it directly. |
179 """ |
178 """ |
180 clientCapabilities = DebugClientCapabilities.HasAll |
179 clientCapabilities = DebugClientCapabilities.HasAll |
181 |
180 |
182 def __init__(self): |
181 def __init__(self): |
183 """ |
182 """ |
510 |
516 |
511 # set the system exception handling function to ensure, that |
517 # set the system exception handling function to ensure, that |
512 # we report on all unhandled exceptions |
518 # we report on all unhandled exceptions |
513 sys.excepthook = self.__unhandled_exception |
519 sys.excepthook = self.__unhandled_exception |
514 |
520 |
515 # clear all old breakpoints, they'll get set after we have started |
521 # clear all old breakpoints, they'll get set after we |
|
522 # have started |
516 self.mainThread.clear_all_breaks() |
523 self.mainThread.clear_all_breaks() |
517 |
524 |
518 self.mainThread.tracePython = tracePython |
525 self.mainThread.tracePython = tracePython |
519 |
526 |
520 # This will eventually enter a local event loop. |
527 # This will eventually enter a local event loop. |
521 # Note the use of backquotes to cause a repr of self.running. The |
528 # Note the use of backquotes to cause a repr of self.running. |
522 # need for this is on Windows os where backslash is the path separator. |
529 # The need for this is on Windows os where backslash is the |
523 # They will get inadvertantly stripped away during the eval causing |
530 # path separator. They will get inadvertantly stripped away |
524 # IOErrors, if self.running is passed as a normal str. |
531 # during the eval causing IOErrors, if self.running is passed |
|
532 # as a normal str. |
525 self.debugMod.__dict__['__file__'] = self.running |
533 self.debugMod.__dict__['__file__'] = self.running |
526 sys.modules['__main__'] = self.debugMod |
534 sys.modules['__main__'] = self.debugMod |
527 self.callTraceEnabled = self.__newCallTraceEnabled |
535 self.callTraceEnabled = self.__newCallTraceEnabled |
528 res = self.mainThread.run('execfile(' + repr(self.running) + ')', |
536 res = self.mainThread.run( |
529 self.debugMod.__dict__) |
537 'execfile(' + repr(self.running) + ')', |
|
538 self.debugMod.__dict__) |
530 self.progTerminated(res) |
539 self.progTerminated(res) |
531 return |
540 return |
532 |
541 |
533 if cmd == DebugProtocol.RequestRun: |
542 if cmd == DebugProtocol.RequestRun: |
534 sys.argv = [] |
543 sys.argv = [] |
906 try: |
918 try: |
907 code = self.compile_command(self.buffer, self.readstream.name) |
919 code = self.compile_command(self.buffer, self.readstream.name) |
908 except (OverflowError, SyntaxError, ValueError): |
920 except (OverflowError, SyntaxError, ValueError): |
909 # Report the exception |
921 # Report the exception |
910 sys.last_type, sys.last_value, sys.last_traceback = sys.exc_info() |
922 sys.last_type, sys.last_value, sys.last_traceback = sys.exc_info() |
911 map(self.write, traceback.format_exception_only(sys.last_type, sys.last_value)) |
923 map(self.write, traceback.format_exception_only( |
|
924 sys.last_type, sys.last_value)) |
912 self.buffer = '' |
925 self.buffer = '' |
913 else: |
926 else: |
914 if code is None: |
927 if code is None: |
915 self.pendingResponse = DebugProtocol.ResponseContinue |
928 self.pendingResponse = DebugProtocol.ResponseContinue |
916 else: |
929 else: |
1093 It opens a network connection to the debugger, connects it to stdin, |
1108 It opens a network connection to the debugger, connects it to stdin, |
1094 stdout and stderr and saves these file objects in case the application |
1109 stdout and stderr and saves these file objects in case the application |
1095 being debugged redirects them itself. |
1110 being debugged redirects them itself. |
1096 |
1111 |
1097 @param port the port number to connect to (int) |
1112 @param port the port number to connect to (int) |
1098 @param remoteAddress the network address of the debug server host (string) |
1113 @param remoteAddress the network address of the debug server host |
1099 @param redirect flag indicating redirection of stdin, stdout and stderr (boolean) |
1114 (string) |
1100 """ |
1115 @param redirect flag indicating redirection of stdin, stdout and |
1101 if remoteAddress is None: # default: 127.0.0.1 |
1116 stderr (boolean) |
|
1117 """ |
|
1118 if remoteAddress is None: # default: 127.0.0.1 |
1102 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
1119 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
1103 sock.connect((DebugProtocol.DebugAddress, port)) |
1120 sock.connect((DebugProtocol.DebugAddress, port)) |
1104 else: |
1121 else: |
1105 if "@@i" in remoteAddress: |
1122 if "@@i" in remoteAddress: |
1106 remoteAddress, index = remoteAddress.split("@@i") |
1123 remoteAddress, index = remoteAddress.split("@@i") |
1107 else: |
1124 else: |
1108 index = 0 |
1125 index = 0 |
1109 if ":" in remoteAddress: # IPv6 |
1126 if ":" in remoteAddress: # IPv6 |
1110 sockaddr = socket.getaddrinfo( |
1127 sockaddr = socket.getaddrinfo( |
1111 remoteAddress, port, 0, 0, socket.SOL_TCP)[0][-1] |
1128 remoteAddress, port, 0, 0, socket.SOL_TCP)[0][-1] |
1112 sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM) |
1129 sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM) |
1113 sockaddr = sockaddr[:-1] + (int(index),) |
1130 sockaddr = sockaddr[:-1] + (int(index),) |
1114 sock.connect(sockaddr) |
1131 sock.connect(sockaddr) |
1115 else: # IPv4 |
1132 else: # IPv4 |
1116 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
1133 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
1117 sock.connect((remoteAddress, port)) |
1134 sock.connect((remoteAddress, port)) |
1118 |
1135 |
1119 self.readstream = AsyncFile(sock, sys.stdin.mode, sys.stdin.name) |
1136 self.readstream = AsyncFile(sock, sys.stdin.mode, sys.stdin.name) |
1120 self.writestream = AsyncFile(sock, sys.stdout.mode, sys.stdout.name) |
1137 self.writestream = AsyncFile(sock, sys.stdout.mode, sys.stdout.name) |
1270 keylist = dict.keys() |
1290 keylist = dict.keys() |
1271 |
1291 |
1272 vlist = self.__formatVariablesList(keylist, dict, scope, filter) |
1292 vlist = self.__formatVariablesList(keylist, dict, scope, filter) |
1273 varlist.extend(vlist) |
1293 varlist.extend(vlist) |
1274 |
1294 |
1275 self.write('%s%s\n' % (DebugProtocol.ResponseVariables, unicode(varlist))) |
1295 self.write('%s%s\n' % ( |
|
1296 DebugProtocol.ResponseVariables, unicode(varlist))) |
1276 |
1297 |
1277 def __dumpVariable(self, var, frmnr, scope, filter): |
1298 def __dumpVariable(self, var, frmnr, scope, filter): |
1278 """ |
1299 """ |
1279 Private method to return the variables of a frame to the debug server. |
1300 Private method to return the variables of a frame to the debug server. |
1280 |
1301 |
1281 @param var list encoded name of the requested variable (list of strings) |
1302 @param var list encoded name of the requested variable |
1282 @param frmnr distance of frame reported on. 0 is the current frame (int) |
1303 (list of strings) |
|
1304 @param frmnr distance of frame reported on. 0 is the current frame |
|
1305 (int) |
1283 @param scope 1 to report global variables, 0 for local variables (int) |
1306 @param scope 1 to report global variables, 0 for local variables (int) |
1284 @param filter the indices of variable types to be filtered (list of int) |
1307 @param filter the indices of variable types to be filtered |
|
1308 (list of int) |
1285 """ |
1309 """ |
1286 if self.currentThread is None: |
1310 if self.currentThread is None: |
1287 return |
1311 return |
1288 |
1312 |
1289 f = self.currentThread.getCurrentFrame() |
1313 f = self.currentThread.getCurrentFrame() |
1564 r, g, b, a = value.getRgb() |
1593 r, g, b, a = value.getRgb() |
1565 varlist.append(("rgb", "int", "%d, %d, %d, %d" % (r, g, b, a))) |
1594 varlist.append(("rgb", "int", "%d, %d, %d, %d" % (r, g, b, a))) |
1566 h, s, v, a = value.getHsv() |
1595 h, s, v, a = value.getHsv() |
1567 varlist.append(("hsv", "int", "%d, %d, %d, %d" % (h, s, v, a))) |
1596 varlist.append(("hsv", "int", "%d, %d, %d, %d" % (h, s, v, a))) |
1568 c, m, y, k, a = value.getCmyk() |
1597 c, m, y, k, a = value.getCmyk() |
1569 varlist.append(("cmyk", "int", "%d, %d, %d, %d, %d" % (c, m, y, k, a))) |
1598 varlist.append( |
|
1599 ("cmyk", "int", "%d, %d, %d, %d, %d" % (c, m, y, k, a))) |
1570 elif qttype == 'QDate': |
1600 elif qttype == 'QDate': |
1571 varlist.append(("", "QDate", "%s" % value.toString())) |
1601 varlist.append(("", "QDate", "%s" % value.toString())) |
1572 elif qttype == 'QTime': |
1602 elif qttype == 'QTime': |
1573 varlist.append(("", "QTime", "%s" % value.toString())) |
1603 varlist.append(("", "QTime", "%s" % value.toString())) |
1574 elif qttype == 'QDateTime': |
1604 elif qttype == 'QDateTime': |
1575 varlist.append(("", "QDateTime", "%s" % value.toString())) |
1605 varlist.append(("", "QDateTime", "%s" % value.toString())) |
1576 elif qttype == 'QDir': |
1606 elif qttype == 'QDir': |
1577 varlist.append(("path", "str", "%s" % value.path())) |
1607 varlist.append(("path", "str", "%s" % value.path())) |
1578 varlist.append(("absolutePath", "str", "%s" % value.absolutePath())) |
1608 varlist.append( |
1579 varlist.append(("canonicalPath", "str", "%s" % value.canonicalPath())) |
1609 ("absolutePath", "str", "%s" % value.absolutePath())) |
|
1610 varlist.append( |
|
1611 ("canonicalPath", "str", "%s" % value.canonicalPath())) |
1580 elif qttype == 'QFile': |
1612 elif qttype == 'QFile': |
1581 varlist.append(("fileName", "str", "%s" % value.fileName())) |
1613 varlist.append(("fileName", "str", "%s" % value.fileName())) |
1582 elif qttype == 'QFont': |
1614 elif qttype == 'QFont': |
1583 varlist.append(("family", "str", "%s" % value.family())) |
1615 varlist.append(("family", "str", "%s" % value.family())) |
1584 varlist.append(("pointSize", "int", "%d" % value.pointSize())) |
1616 varlist.append(("pointSize", "int", "%d" % value.pointSize())) |
1596 elif qttype == 'QModelIndex': |
1628 elif qttype == 'QModelIndex': |
1597 varlist.append(("valid", "bool", "%s" % value.isValid())) |
1629 varlist.append(("valid", "bool", "%s" % value.isValid())) |
1598 if value.isValid(): |
1630 if value.isValid(): |
1599 varlist.append(("row", "int", "%s" % value.row())) |
1631 varlist.append(("row", "int", "%s" % value.row())) |
1600 varlist.append(("column", "int", "%s" % value.column())) |
1632 varlist.append(("column", "int", "%s" % value.column())) |
1601 varlist.append(("internalId", "int", "%s" % value.internalId())) |
1633 varlist.append( |
|
1634 ("internalId", "int", "%s" % value.internalId())) |
1602 varlist.append(("internalPointer", "void *", "%s" % \ |
1635 varlist.append(("internalPointer", "void *", "%s" % \ |
1603 value.internalPointer())) |
1636 value.internalPointer())) |
1604 elif qttype == 'QRegExp': |
1637 elif qttype == 'QRegExp': |
1605 varlist.append(("pattern", "str", "%s" % value.pattern())) |
1638 varlist.append(("pattern", "str", "%s" % value.pattern())) |
1606 |
1639 |
1609 varlist.append(("name", "str", "%s" % value.objectName())) |
1642 varlist.append(("name", "str", "%s" % value.objectName())) |
1610 varlist.append(("text", "str", "%s" % value.text())) |
1643 varlist.append(("text", "str", "%s" % value.text())) |
1611 varlist.append(("icon text", "str", "%s" % value.iconText())) |
1644 varlist.append(("icon text", "str", "%s" % value.iconText())) |
1612 varlist.append(("tooltip", "str", "%s" % value.toolTip())) |
1645 varlist.append(("tooltip", "str", "%s" % value.toolTip())) |
1613 varlist.append(("whatsthis", "str", "%s" % value.whatsThis())) |
1646 varlist.append(("whatsthis", "str", "%s" % value.whatsThis())) |
1614 varlist.append(("shortcut", "str", "%s" % value.shortcut().toString())) |
1647 varlist.append( |
|
1648 ("shortcut", "str", "%s" % value.shortcut().toString())) |
1615 elif qttype == 'QKeySequence': |
1649 elif qttype == 'QKeySequence': |
1616 varlist.append(("value", "", "%s" % value.toString())) |
1650 varlist.append(("value", "", "%s" % value.toString())) |
1617 |
1651 |
1618 # XML stuff |
1652 # XML stuff |
1619 elif qttype == 'QDomAttr': |
1653 elif qttype == 'QDomAttr': |
1631 elif qttype == 'QDomText': |
1665 elif qttype == 'QDomText': |
1632 varlist.append(("data", "str", "%s" % value.data())) |
1666 varlist.append(("data", "str", "%s" % value.data())) |
1633 |
1667 |
1634 # Networking stuff |
1668 # Networking stuff |
1635 elif qttype == 'QHostAddress': |
1669 elif qttype == 'QHostAddress': |
1636 varlist.append(("address", "QHostAddress", "%s" % value.toString())) |
1670 varlist.append( |
|
1671 ("address", "QHostAddress", "%s" % value.toString())) |
1637 |
1672 |
1638 return varlist |
1673 return varlist |
1639 |
1674 |
1640 def __formatVariablesList(self, keylist, dict, scope, filter=[], |
1675 def __formatVariablesList(self, keylist, dict, scope, filter=[], |
1641 formatSequences=0): |
1676 formatSequences=0): |
1642 """ |
1677 """ |
1643 Private method to produce a formated variables list. |
1678 Private method to produce a formated variables list. |
1644 |
1679 |
1645 The dictionary passed in to it is scanned. Variables are |
1680 The dictionary passed in to it is scanned. Variables are |
1646 only added to the list, if their type is not contained |
1681 only added to the list, if their type is not contained |
1647 in the filter list and their name doesn't match any of the filter expressions. |
1682 in the filter list and their name doesn't match any of |
1648 The formated variables list (a list of tuples of 3 values) is returned. |
1683 the filter expressions. The formated variables list (a list of tuples |
|
1684 of 3 values) is returned. |
1649 |
1685 |
1650 @param keylist keys of the dictionary |
1686 @param keylist keys of the dictionary |
1651 @param dict the dictionary to be scanned |
1687 @param dict the dictionary to be scanned |
1652 @param scope 1 to filter using the globals filter, 0 using the locals |
1688 @param scope 1 to filter using the globals filter, 0 using the locals |
1653 filter (int). |
1689 filter (int). |
1654 Variables are only added to the list, if their name do not match any of the |
1690 Variables are only added to the list, if their name do not match |
1655 filter expressions. |
1691 any of the filter expressions. |
1656 @param filter the indices of variable types to be filtered. Variables are |
1692 @param filter the indices of variable types to be filtered. Variables |
1657 only added to the list, if their type is not contained in the filter |
1693 are only added to the list, if their type is not contained in the |
1658 list. |
1694 filter list. |
1659 @param formatSequences flag indicating, that sequence or dictionary variables |
1695 @param formatSequences flag indicating, that sequence or dictionary |
1660 should be formatted. If it is 0 (or false), just the number of items contained |
1696 variables should be formatted. If it is 0 (or false), just the |
1661 in these variables is returned. (boolean) |
1697 number of items contained in these variables is returned. (boolean) |
1662 @return A tuple consisting of a list of formatted variables. Each variable |
1698 @return A tuple consisting of a list of formatted variables. Each |
1663 entry is a tuple of three elements, the variable name, its type and |
1699 variable entry is a tuple of three elements, the variable name, |
1664 value. |
1700 its type and value. |
1665 """ |
1701 """ |
1666 varlist = [] |
1702 varlist = [] |
1667 if scope: |
1703 if scope: |
1668 patternFilterObjects = self.globalsFilterObjects |
1704 patternFilterObjects = self.globalsFilterObjects |
1669 else: |
1705 else: |
1797 |
1835 |
1798 @param filename the program to be debugged (string) |
1836 @param filename the program to be debugged (string) |
1799 @param host hostname of the debug server (string) |
1837 @param host hostname of the debug server (string) |
1800 @param port portnumber of the debug server (int) |
1838 @param port portnumber of the debug server (int) |
1801 @param enableTrace flag to enable the tracing function (boolean) |
1839 @param enableTrace flag to enable the tracing function (boolean) |
1802 @param exceptions flag to enable exception reporting of the IDE (boolean) |
1840 @param exceptions flag to enable exception reporting of the IDE |
1803 @param tracePython flag to enable tracing into the Python library (boolean) |
1841 (boolean) |
1804 @param redirect flag indicating redirection of stdin, stdout and stderr (boolean) |
1842 @param tracePython flag to enable tracing into the Python library |
|
1843 (boolean) |
|
1844 @param redirect flag indicating redirection of stdin, stdout and |
|
1845 stderr (boolean) |
1805 """ |
1846 """ |
1806 global debugClient |
1847 global debugClient |
1807 if host is None: |
1848 if host is None: |
1808 host = os.getenv('ERICHOST', 'localhost') |
1849 host = os.getenv('ERICHOST', 'localhost') |
1809 if port is None: |
1850 if port is None: |
1850 @param progargs commandline for the program to be debugged |
1892 @param progargs commandline for the program to be debugged |
1851 (list of strings) |
1893 (list of strings) |
1852 @param wd working directory for the program execution (string) |
1894 @param wd working directory for the program execution (string) |
1853 @param host hostname of the debug server (string) |
1895 @param host hostname of the debug server (string) |
1854 @param port portnumber of the debug server (int) |
1896 @param port portnumber of the debug server (int) |
1855 @param exceptions flag to enable exception reporting of the IDE (boolean) |
1897 @param exceptions flag to enable exception reporting of the IDE |
1856 @param tracePython flag to enable tracing into the Python library (boolean) |
1898 (boolean) |
1857 @param redirect flag indicating redirection of stdin, stdout and stderr (boolean) |
1899 @param tracePython flag to enable tracing into the Python library |
|
1900 (boolean) |
|
1901 @param redirect flag indicating redirection of stdin, stdout and |
|
1902 stderr (boolean) |
1858 """ |
1903 """ |
1859 if host is None: |
1904 if host is None: |
1860 host = os.getenv('ERICHOST', 'localhost') |
1905 host = os.getenv('ERICHOST', 'localhost') |
1861 if port is None: |
1906 if port is None: |
1862 port = os.getenv('ERICPORT', 42424) |
1907 port = os.getenv('ERICPORT', 42424) |
1891 sys.excepthook = self.__unhandled_exception |
1937 sys.excepthook = self.__unhandled_exception |
1892 |
1938 |
1893 # This will eventually enter a local event loop. |
1939 # This will eventually enter a local event loop. |
1894 # Note the use of backquotes to cause a repr of self.running. The |
1940 # Note the use of backquotes to cause a repr of self.running. The |
1895 # need for this is on Windows os where backslash is the path separator. |
1941 # need for this is on Windows os where backslash is the path separator. |
1896 # They will get inadvertantly stripped away during the eval causing IOErrors |
1942 # They will get inadvertantly stripped away during the eval causing |
1897 # if self.running is passed as a normal str. |
1943 # IOErrors if self.running is passed as a normal str. |
1898 self.debugMod.__dict__['__file__'] = self.running |
1944 self.debugMod.__dict__['__file__'] = self.running |
1899 sys.modules['__main__'] = self.debugMod |
1945 sys.modules['__main__'] = self.debugMod |
1900 res = self.mainThread.run('execfile(' + repr(self.running) + ')', |
1946 res = self.mainThread.run('execfile(' + repr(self.running) + ')', |
1901 self.debugMod.__dict__) |
1947 self.debugMod.__dict__) |
1902 self.progTerminated(res) |
1948 self.progTerminated(res) |
1986 print "No program given. Aborting!" |
2033 print "No program given. Aborting!" |
1987 else: |
2034 else: |
1988 if not self.noencoding: |
2035 if not self.noencoding: |
1989 self.__coding = self.defaultCoding |
2036 self.__coding = self.defaultCoding |
1990 self.startProgInDebugger(args, wd, host, port, |
2037 self.startProgInDebugger(args, wd, host, port, |
1991 exceptions=exceptions, tracePython=tracePython, |
2038 exceptions=exceptions, |
|
2039 tracePython=tracePython, |
1992 redirect=redirect) |
2040 redirect=redirect) |
1993 else: |
2041 else: |
1994 if sys.argv[1] == '--no-encoding': |
2042 if sys.argv[1] == '--no-encoding': |
1995 self.noencoding = True |
2043 self.noencoding = True |
1996 del sys.argv[1] |
2044 del sys.argv[1] |