bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def test_fields(self): # test the offset and size attributes of Structure/Unoin fields. class X(Structure): _fields_ = [("x", c_int), ("y", c_char)] | def test_fields(self): # test the offset and size attributes of Structure/Unoin fields. class X(Structure): _fields_ = [("x", c_int), ("y", c_char)] | 20,900 |
def getaddrlist(self, name): """Get a list of addresses from a header. Retrieves a list of addresses from a header, where each address is a tuple as returned by getaddr(). """ # New, by Ben Escoto try: data = self[name] except KeyError: return [] a = AddrlistClass(data) return a.getaddrlist() | def getaddrlist(self, name): """Get a list of addresses from a header. Retrieves a list of addresses from a header, where each address is a tuple as returned by getaddr(). """ # New, by Ben Escoto try: data = self[name] except KeyError: return [] a = AddrlistClass(data) return a.getaddrlist() | 20,901 |
def __init__(self, field): """Initialize a new instance. `field' is an unparsed address header field, containing one or more addresses. """ self.specials = '()<>@,:;.\"[]' self.pos = 0 self.LWS = ' \t' self.CR = '\r' self.atomends = self.specials + self.LWS + self.CR self.field = field self.commentlist = [] | def __init__(self, field): """Initialize a new instance. `field' is an unparsed address header field, containing one or more addresses. """ self.specials = '()<>@,:;.\"[]' self.pos = 0 self.LWS = ' \t' self.CR = '\r\n' self.atomends = self.specials + self.LWS + self.CR self.field = field self.commentlist = [] | 20,902 |
def __init__(self, field): """Initialize a new instance. `field' is an unparsed address header field, containing one or more addresses. """ self.specials = '()<>@,:;.\"[]' self.pos = 0 self.LWS = ' \t' self.CR = '\r' self.atomends = self.specials + self.LWS + self.CR self.field = field self.commentlist = [] | def__init__(self,field):"""Initializeanewinstance.`field'isanunparsedaddressheaderfield,containingoneormoreaddresses."""self.specials='()<>@,:;.\"[]'self.pos=0self.LWS='\t'self.CR='\r'self.atomends=self.specials+self.LWS+self.CRself.field=fieldself.commentlist=[] | 20,903 |
def getdomain(self): """Get the complete domain name from an address.""" sdlist = [] while self.pos < len(self.field): if self.field[self.pos] in self.LWS: self.pos = self.pos + 1 elif self.field[self.pos] == '(': self.commentlist.append(self.getcomment()) elif self.field[self.pos] == '[': sdlist.append(self.getdomainl... | defgetdomain(self):"""Getthecompletedomainnamefromanaddress."""sdlist=[]whileself.pos<len(self.field):ifself.field[self.pos]inself.LWS:self.pos=self.pos+1elifself.field[self.pos]=='(':self.commentlist.append(self.getcomment())elifself.field[self.pos]=='[':sdlist.append(self.getdomainliteral())elifself.field[self.pos]==... | 20,904 |
def test_main(): tests = [ GeneralModuleTests, BasicTCPTest ] if sys.platform != 'mac': tests.append(BasicUDPTest) tests.extend([ NonBlockingTCPTests, FileObjectClassTestCase, UnbufferedFileObjectClassTestCase, LineBufferedFileObjectClassTestCase, SmallBufferedFileObjectClassTestCase ]) test_support.run_unittest(*test... | def test_main(): tests = [GeneralModuleTests, BasicTCPTest, TCPTimeoutTest, TestExceptions] if sys.platform != 'mac': tests.append(BasicUDPTest) tests.extend([ NonBlockingTCPTests, FileObjectClassTestCase, UnbufferedFileObjectClassTestCase, LineBufferedFileObjectClassTestCase, SmallBufferedFileObjectClassTestCase ]) t... | 20,905 |
def test_main(): tests = [ GeneralModuleTests, BasicTCPTest ] if sys.platform != 'mac': tests.append(BasicUDPTest) tests.extend([ NonBlockingTCPTests, FileObjectClassTestCase, UnbufferedFileObjectClassTestCase, LineBufferedFileObjectClassTestCase, SmallBufferedFileObjectClassTestCase ]) test_support.run_unittest(*test... | def test_main(): tests = [ GeneralModuleTests, BasicTCPTest ] if sys.platform != 'mac': tests.extend([ BasicUDPTest, UDPTimeoutTest ]) tests.extend([ NonBlockingTCPTests, FileObjectClassTestCase, UnbufferedFileObjectClassTestCase, LineBufferedFileObjectClassTestCase, SmallBufferedFileObjectClassTestCase ]) test_suppor... | 20,906 |
def change_root (new_root, pathname): """Return 'pathname' with 'new_root' prepended. If 'pathname' is relative, this is equivalent to "os.path.join(new_root,pathname)". Otherwise, it requires making 'pathname' relative and then joining the two, which is tricky on DOS/Windows and Mac OS.""" if not abspath (pathname)... | defchange_root(new_root,pathname):"""Return'pathname'with'new_root'prepended.If'pathname'isrelative,thisisequivalentto"os.path.join(new_root,pathname)".Otherwise,itrequiresmaking'pathname'relativeandthenjoiningthetwo,whichistrickyonDOS/WindowsandMacOS."""ifnotabspath(pathname):returnos.path.join(new_root,pathname)elifo... | 20,907 |
def change_root (new_root, pathname): """Return 'pathname' with 'new_root' prepended. If 'pathname' is relative, this is equivalent to "os.path.join(new_root,pathname)". Otherwise, it requires making 'pathname' relative and then joining the two, which is tricky on DOS/Windows and Mac OS.""" if not abspath (pathname)... | def change_root (new_root, pathname): """Return 'pathname' with 'new_root' prepended. If 'pathname' is relative, this is equivalent to "os.path.join(new_root,pathname)". Otherwise, it requires making 'pathname' relative and then joining the two, which is tricky on DOS/Windows and Mac OS. """ if os.name == 'posix': if... | 20,908 |
def change_root (new_root, pathname): """Return 'pathname' with 'new_root' prepended. If 'pathname' is relative, this is equivalent to "os.path.join(new_root,pathname)". Otherwise, it requires making 'pathname' relative and then joining the two, which is tricky on DOS/Windows and Mac OS.""" if not abspath (pathname)... | def change_root (new_root, pathname): """Return 'pathname' with 'new_root' prepended. If 'pathname' is relative, this is equivalent to "os.path.join(new_root,pathname)". Otherwise, it requires making 'pathname' relative and then joining the two, which is tricky on DOS/Windows and Mac OS.""" if not abspath (pathname)... | 20,909 |
def change_root (new_root, pathname): """Return 'pathname' with 'new_root' prepended. If 'pathname' is relative, this is equivalent to "os.path.join(new_root,pathname)". Otherwise, it requires making 'pathname' relative and then joining the two, which is tricky on DOS/Windows and Mac OS.""" if not abspath (pathname)... | def change_root (new_root, pathname): """Return 'pathname' with 'new_root' prepended. If 'pathname' is relative, this is equivalent to "os.path.join(new_root,pathname)". Otherwise, it requires making 'pathname' relative and then joining the two, which is tricky on DOS/Windows and Mac OS.""" if not abspath (pathname)... | 20,910 |
def consistency_with_epg(): if verbose: print "Testing consistentcy with EPG..." class Pane(object): pass class ScrollingMixin(object): pass class EditingMixin(object): pass class ScrollablePane(Pane,ScrollingMixin): pass class EditablePane(Pane,EditingMixin): pass class EditableScrollablePane(ScrollablePane,EditablePa... | def consistency_with_epg(): if verbose: print "Testing consistentcy with EPG..." class Pane(object): pass class ScrollingMixin(object): pass class EditingMixin(object): pass class ScrollablePane(Pane,ScrollingMixin): pass class EditablePane(Pane,EditingMixin): pass class EditableScrollablePane(ScrollablePane,EditablePa... | 20,911 |
def toprettyxml(self, indent="\t", newl="\n"): # indent = the indentation string to prepend, per level # newl = the newline string to append writer = _get_StringIO() self.writexml(writer, "", indent, newl) return writer.getvalue() | def toprettyxml(self, indent="\t", newl="\n"): # indent = the indentation string to prepend, per level # newl = the newline string to append writer = _get_StringIO() self.writexml(writer, "", indent, newl) return writer.getvalue() | 20,912 |
def unified_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\n'): r""" Compare two sequences of lines; generate the delta as a unified diff. Unified diffs are a compact way of showing line changes and a few lines of context. The number of context lines is set by 'n' which defaults to... | def unified_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\n'): r""" Compare two sequences of lines; generate the delta as a unified diff. Unified diffs are a compact way of showing line changes and a few lines of context. The number of context lines is set by 'n' which defaults to... | 20,913 |
def search(self, charset, criteria): """Search mailbox for matching messages. | def search(self, charset, *criteria): """Search mailbox for matching messages. | 20,914 |
def search(self, charset, criteria): """Search mailbox for matching messages. | def search(self, charset, criteria): """Search mailbox for matching messages. | 20,915 |
def search(self, charset, criteria): """Search mailbox for matching messages. | def search(self, charset, criteria): """Search mailbox for matching messages. | 20,916 |
def print_log(): _mesg('last %d IMAP4 interactions:' % len(_cmd_log)) for secs,line in _cmd_log: _mesg(line, secs) | def print_log(): _mesg('last %d IMAP4 interactions:' % len(_cmd_log)) for secs,line in _cmd_log: _mesg(line, secs) | 20,917 |
def print_log(): _mesg('last %d IMAP4 interactions:' % len(_cmd_log)) for secs,line in _cmd_log: _mesg(line, secs) | def print_log(): _mesg('last %d IMAP4 interactions:' % len(_cmd_log)) for secs,line in _cmd_log: _mesg(line, secs) | 20,918 |
def run(cmd, args): _mesg('%s %s' % (cmd, args)) typ, dat = apply(eval('M.%s' % cmd), args) _mesg('%s => %s %s' % (cmd, typ, dat)) return dat | def run(cmd, args): _mesg('%s %s' % (cmd, args)) typ, dat = apply(eval('M.%s' % cmd), args) _mesg('%s => %s %s' % (cmd, typ, dat)) return dat | 20,919 |
def test_encoding_decoding(self): codecs = [('rot13', 'uryyb jbeyq'), ('base64', 'aGVsbG8gd29ybGQ=\n'), ('hex', '68656c6c6f20776f726c64'), ('uu', 'begin 666 <data>\n+:&5L;&\\@=V]R;&0 \n \nend\n')] for encoding, data in codecs: self.checkequal(data, 'hello world', 'encode', encoding) self.checkequal('hello world', data,... | def test_encoding_decoding(self): codecs = [('rot13', 'uryyb jbeyq'), ('base64', 'aGVsbG8gd29ybGQ=\n'), ('hex', '68656c6c6f20776f726c64'), ('uu', 'begin 666 <data>\n+:&5L;&\\@=V]R;&0 \n \nend\n')] for encoding, data in codecs: self.checkequal(data, 'hello world', 'encode', encoding) self.checkequal('hello world', data,... | 20,920 |
def run (self): if (sys.platform != "win32" and (self.distribution.has_ext_modules() or self.distribution.has_c_libraries())): raise DistutilsPlatformError \ ("distribution contains extensions and/or C libraries; " "must be compiled on a Windows 32 platform") | def run (self): if (sys.platform != "win32" and (self.distribution.has_ext_modules() or self.distribution.has_c_libraries())): raise DistutilsPlatformError \ ("distribution contains extensions and/or C libraries; " "must be compiled on a Windows 32 platform") | 20,921 |
def basic_test_inplace_concat(self, size): l = [sys.stdout] * size l += l self.assertEquals(len(l), size * 2) self.failUnless(l[0] is l[-1]) self.failUnless(l[size - 1] is l[size + 1]) | def basic_test_inplace_concat(self, size): l = [sys.stdout] * size l += l self.assertEquals(len(l), size * 2) self.failUnless(l[0] is l[-1]) self.failUnless(l[size - 1] is l[size + 1]) | 20,922 |
def test_inplace_concat_small(self, size): return self.basic_test_inplace_concat(size) | def test_inplace_concat_small(self, size): return self.basic_test_inplace_concat(size) | 20,923 |
def search(self, charset, *criteria): """Search mailbox for matching messages. | def search(self, charset, *criteria): """Search mailbox for matching messages. | 20,924 |
def fixup_descriptors(doc): for tagName in DESCRIPTOR_ELEMENTS: nodes = find_all_elements(doc, tagName) for node in nodes: rewrite_descriptor(doc, node) | def fixup_descriptors(doc): sections = find_all_elements(doc, "section") for section in sections: find_and_fix_descriptors(doc, section) def find_and_fix_descriptors(doc, container): children = container.childNodes for child in children: if child.nodeType == xml.dom.core.ELEMENT: tagName = child.tagName if tagName in... | 20,925 |
def next(self): if not self.boxes: return None fn = self.boxes[0] del self.boxes[0] fp = open(os.path.join(self.dirname, fn)) return rfc822.Message(fp) | def next(self): if not self.boxes: return None fn = self.boxes[0] del self.boxes[0] fp = open(os.path.join(self.dirname, fn)) return rfc822.Message(fp) class Maildir: def __init__(self, dirname): import string self.dirname = dirname self.boxes = [] newdir = os.path.join(self.dirname, 'new') for file in os.listdir(... | 20,926 |
def _test(): import time import sys import string import os args = sys.argv[1:] if not args: for key in 'MAIL', 'LOGNAME', 'USER': if os.environ.has_key(key): mbox = os.environ[key] break else: print "$MAIL, $LOGNAME nor $USER set -- who are you?" return else: mbox = args[0] if mbox[:1] == '+': mbox = os.environ['HOME... | def _test(): import time import sys import string import os args = sys.argv[1:] if not args: for key in 'MAILDIR', 'MAIL', 'LOGNAME', 'USER': if os.environ.has_key(key): mbox = os.environ[key] break else: print "$MAIL, $LOGNAME nor $USER set -- who are you?" return else: mbox = args[0] if mbox[:1] == '+': mbox = os.en... | 20,927 |
def _test(): import time import sys import string import os args = sys.argv[1:] if not args: for key in 'MAIL', 'LOGNAME', 'USER': if os.environ.has_key(key): mbox = os.environ[key] break else: print "$MAIL, $LOGNAME nor $USER set -- who are you?" return else: mbox = args[0] if mbox[:1] == '+': mbox = os.environ['HOME... | def _test(): import time import sys import string import os args = sys.argv[1:] if not args: for key in 'MAIL', 'LOGNAME', 'USER': if os.environ.has_key(key): mbox = os.environ[key] break else: print "$MAIL, $LOGNAME nor $USER set -- who are you?" return else: mbox = args[0] if mbox[:1] == '+': mbox = os.environ['HOME... | 20,928 |
def main(): # Find the template # (there's no point in proceeding if we can't find it) for p in sys.path: template = os.path.join(p, TEMPLATE) try: template, d1, d2 = macfs.ResolveAliasFile(template) break except (macfs.error, ValueError): continue else: die("Template %s not found on sys.path" % `TEMPLATE`) return te... | def main(): # Find the template # (there's no point in proceeding if we can't find it) for p in sys.path: template = os.path.join(p, TEMPLATE) try: template, d1, d2 = macfs.ResolveAliasFile(template) break except (macfs.error, ValueError): continue else: die("Template %s not found on sys.path" % `TEMPLATE`) return te... | 20,929 |
def process(template, filename, output): print "Processing", `filename`, "..." # Read the source and compile it # (there's no point overwriting the destination if it has a syntax error) fp = open(filename) text = fp.read() fp.close() try: code = compile(text, filename, "exec") except (SyntaxError, EOFError): die("Sy... | def process(template, filename, output): if DEBUG: print "Processing", `filename`, "..." # Read the source and compile it # (there's no point overwriting the destination if it has a syntax error) fp = open(filename) text = fp.read() fp.close() try: code = compile(text, filename, "exec") except (SyntaxError, EOFError... | 20,930 |
def process(template, filename, output): print "Processing", `filename`, "..." # Read the source and compile it # (there's no point overwriting the destination if it has a syntax error) fp = open(filename) text = fp.read() fp.close() try: code = compile(text, filename, "exec") except (SyntaxError, EOFError): die("Sy... | def process(template, filename, output): print "Processing", `filename`, "..." # Read the source and compile it # (there's no point overwriting the destination if it has a syntax error) fp = open(filename) text = fp.read() fp.close() try: code = compile(text, filename, "exec") except (SyntaxError, EOFError): die("Sy... | 20,931 |
def process(template, filename, output): print "Processing", `filename`, "..." # Read the source and compile it # (there's no point overwriting the destination if it has a syntax error) fp = open(filename) text = fp.read() fp.close() try: code = compile(text, filename, "exec") except (SyntaxError, EOFError): die("Sy... | def process(template, filename, output): print "Processing", `filename`, "..." # Read the source and compile it # (there's no point overwriting the destination if it has a syntax error) fp = open(filename) text = fp.read() fp.close() try: code = compile(text, filename, "exec") except (SyntaxError, EOFError): die("Sy... | 20,932 |
def copyres(input, output): ctor = None UseResFile(input) ntypes = Count1Types() for itype in range(1, 1+ntypes): type = Get1IndType(itype) nresources = Count1Resources(type) for ires in range(1, 1+nresources): res = Get1IndResource(type, ires) id, type, name = res.GetResInfo() lcname = string.lower(name) if (type, lcn... | def copyres(input, output): ctor = None UseResFile(input) ntypes = Count1Types() for itype in range(1, 1+ntypes): type = Get1IndType(itype) nresources = Count1Resources(type) for ires in range(1, 1+nresources): res = Get1IndResource(type, ires) id, type, name = res.GetResInfo() lcname = string.lower(name) if (type, lcn... | 20,933 |
def copyres(input, output): ctor = None UseResFile(input) ntypes = Count1Types() for itype in range(1, 1+ntypes): type = Get1IndType(itype) nresources = Count1Resources(type) for ires in range(1, 1+nresources): res = Get1IndResource(type, ires) id, type, name = res.GetResInfo() lcname = string.lower(name) if (type, lcn... | def copyres(input, output): ctor = None UseResFile(input) ntypes = Count1Types() for itype in range(1, 1+ntypes): type = Get1IndType(itype) nresources = Count1Resources(type) for ires in range(1, 1+nresources): res = Get1IndResource(type, ires) id, type, name = res.GetResInfo() lcname = string.lower(name) if (type, lcn... | 20,934 |
def copyres(input, output): ctor = None UseResFile(input) ntypes = Count1Types() for itype in range(1, 1+ntypes): type = Get1IndType(itype) nresources = Count1Resources(type) for ires in range(1, 1+nresources): res = Get1IndResource(type, ires) id, type, name = res.GetResInfo() lcname = string.lower(name) if (type, lcn... | def copyres(input, output): ctor = None UseResFile(input) ntypes = Count1Types() for itype in range(1, 1+ntypes): type = Get1IndType(itype) nresources = Count1Resources(type) for ires in range(1, 1+nresources): res = Get1IndResource(type, ires) id, type, name = res.GetResInfo() lcname = string.lower(name) if (type, lcn... | 20,935 |
def __init__(self, master, cnf={}, **kw): TixWidget.__init__(self, master, 'tixDirList', ['options'], cnf, kw) self.subwidget_list['hlist'] = _dummyHList(self, 'hlist') self.subwidget_list['shlist'] = _dummyScrolledHList(self, 'vsb') | def __init__(self, master, cnf={}, **kw): TixWidget.__init__(self, master, 'tixDirList', ['options'], cnf, kw) self.subwidget_list['hlist'] = _dummyHList(self, 'hlist') self.subwidget_list['shlist'] = _dummyScrolledHList(self, 'vsb') | 20,936 |
def makepath(*paths): dir = os.path.abspath(os.path.join(*paths)) return dir, os.path.normcase(dir) | def makepath(*paths): dir = os.path.abspath(os.path.join(*paths)) return dir, os.path.normcase(dir) | 20,937 |
def create_generators(num, delta, firstseed=None): ""\"Return list of num distinct generators. Each generator has its own unique segment of delta elements from Random.random()'s full period. Seed the first generator with optional arg firstseed (default is None, to seed from current time). ""\" from random import Rando... | def create_generators(num, delta, firstseed=None): ""\"Return list of num distinct generators. Each generator has its own unique segment of delta elements from Random.random()'s full period. Seed the first generator with optional arg firstseed (default is None, to seed from current time). ""\" from random import Rando... | 20,938 |
def _test(N=20000): print 'TWOPI =', TWOPI print 'LOG4 =', LOG4 print 'NV_MAGICCONST =', NV_MAGICCONST print 'SG_MAGICCONST =', SG_MAGICCONST _test_generator(N, 'random()') _test_generator(N, 'normalvariate(0.0, 1.0)') _test_generator(N, 'lognormvariate(0.0, 1.0)') _test_generator(N, 'cunifvariate(0.0,... | def _test_sample(n): population = xrange(n) for k in xrange(n+1): s = sample(population, k) assert len(dict([(elem,True) for elem in s])) == len(s) == k def _sample_generator(n, k): return sample(xrange(n), k)[k//2] def _test(N=2000): print 'TWOPI =', TWOPI print 'LOG4 =', LOG4 print 'NV_MAGICCONS... | 20,939 |
def __init__(self, tkconsole): self.tkconsole = tkconsole InteractiveInterpreter.__init__(self) | def __init__(self, tkconsole): self.tkconsole = tkconsole InteractiveInterpreter.__init__(self) | 20,940 |
def runsource(self, source): # Extend base class to stuff the source in the line cache filename = "<pyshell#%d>" % self.gid self.gid = self.gid + 1 lines = string.split(source, "\n") linecache.cache[filename] = len(source)+1, 0, lines, filename self.more = 0 return InteractiveInterpreter.runsource(self, source, filenam... | def filename = self.stuffsource(source) self.more = 0 return InteractiveInterpreter.runsource(self, source, filename) def stuffsource(self, source): runsource(self, filename = self.stuffsource(source) self.more = 0 return InteractiveInterpreter.runsource(self, source, filename) def stuffsource(self, source): source... | 20,941 |
def runsource(self, source): # Extend base class to stuff the source in the line cache filename = "<pyshell#%d>" % self.gid self.gid = self.gid + 1 lines = string.split(source, "\n") linecache.cache[filename] = len(source)+1, 0, lines, filename self.more = 0 return InteractiveInterpreter.runsource(self, source, filenam... | def runsource(self, source): # Extend base class to stuff the source in the line cache filename = "<pyshell#%d>" % self.gid self.gid = self.gid + 1 lines = string.split(source, "\n") linecache.cache[filename] = len(source)+1, 0, lines, filename self.more = 0 return InteractiveInterpreter.runsource(self, source, filenam... | 20,942 |
def showsyntaxerror(self, filename=None): # Extend base class to color the offending position # (instead of printing it and pointing at it with a caret) text = self.tkconsole.text stuff = self.unpackerror() if not stuff: self.tkconsole.resetoutput() InteractiveInterpreter.showsyntaxerror(self, filename) return msg, lin... | def showsyntaxerror(self, filename=None): # Extend base class to color the offending position # (instead of printing it and pointing at it with a caret) text = self.tkconsole.text stuff = self.unpackerror() if not stuff: self.tkconsole.resetoutput() InteractiveInterpreter.showsyntaxerror(self, filename) return msg, lin... | 20,943 |
def unpackerror(self): type, value, tb = sys.exc_info() ok = type == SyntaxError if ok: try: msg, (dummy_filename, lineno, offset, line) = value except: ok = 0 if ok: return msg, lineno, offset, line else: return None | def unpackerror(self): type, value, tb = sys.exc_info() ok = type is SyntaxError if ok: try: msg, (dummy_filename, lineno, offset, line) = value except: ok = 0 if ok: return msg, lineno, offset, line else: return None | 20,944 |
def toggle_debugger(self, event=None): if self.executing: tkMessageBox.showerror("Don't debug now", "You can only toggle the debugger when idle", master=self.text) self.set_debugger_indicator() return "break" else: db = self.interp.getdebugger() if db: self.close_debugger() else: self.open_debugger() | def toggle_debugger(self, event=None): if self.executing: tkMessageBox.showerror("Don't debug now", "You can only toggle the debugger when idle", master=self.text) self.set_debugger_indicator() return "break" else: db = self.interp.getdebugger() if db: self.close_debugger() else: self.open_debugger() | 20,945 |
def close(self): # Extend base class method if self.executing: # XXX Need to ask a question here if not tkMessageBox.askokcancel( "Kill?", "The program is still running; do you want to kill it?", default="ok", master=self.text): return "cancel" self.canceled = 1 if self.reading: self.top.quit() return "cancel" reply = ... | def close(self): # Extend base class method if self.executing: # XXX Need to ask a question here if not tkMessageBox.askokcancel( "Kill?", "The program is still running; do you want to kill it?", default="ok", master=self.text): return "cancel" self.canceled = 1 if self.reading: self.top.quit() return "cancel" reply = ... | 20,946 |
def short_title(self): return "Python Shell" | def short_title(self): return "Python Shell" | 20,947 |
def main(): debug = 0 try: opts, args = getopt.getopt(sys.argv[1:], "d") except getopt.error, msg: sys.stderr.write("Error: %s\n" % str(msg)) sys.exit(2) for o, a in opts: if o == "-d": debug = 1 global flist, root root = Tk() fixwordbreaks(root) root.withdraw() flist = PyShellFileList(root) if args: for filename in sy... | def main(): debug = 0 try: opts, args = getopt.getopt(sys.argv[1:], "c:deist:") except getopt.error, msg: sys.stderr.write("Error: %s\n" % str(msg)) sys.exit(2) for o, a in opts: if o == "-d": debug = 1 global flist, root root = Tk() fixwordbreaks(root) root.withdraw() flist = PyShellFileList(root) if args: for filenam... | 20,948 |
def main(): debug = 0 try: opts, args = getopt.getopt(sys.argv[1:], "d") except getopt.error, msg: sys.stderr.write("Error: %s\n" % str(msg)) sys.exit(2) for o, a in opts: if o == "-d": debug = 1 global flist, root root = Tk() fixwordbreaks(root) root.withdraw() flist = PyShellFileList(root) if args: for filename in sy... | def main(): debug = 0 try: opts, args = getopt.getopt(sys.argv[1:], "d") except getopt.error, msg: sys.stderr.write("Error: %s\n" % str(msg)) sys.exit(2) for o, a in opts: if o == '-c': cmd = a if o == '-d': debug = 1 global flist, root root = Tk() fixwordbreaks(root) root.withdraw() flist = PyShellFileList(root) if ar... | 20,949 |
def main(): debug = 0 try: opts, args = getopt.getopt(sys.argv[1:], "d") except getopt.error, msg: sys.stderr.write("Error: %s\n" % str(msg)) sys.exit(2) for o, a in opts: if o == "-d": debug = 1 global flist, root root = Tk() fixwordbreaks(root) root.withdraw() flist = PyShellFileList(root) if args: for filename in sy... | def main(): debug = 0 try: opts, args = getopt.getopt(sys.argv[1:], "d") except getopt.error, msg: sys.stderr.write("Error: %s\n" % str(msg)) sys.exit(2) for o, a in opts: if o == "-d": debug = 1 global flist, root root = Tk() fixwordbreaks(root) root.withdraw() flist = PyShellFileList(root) if edit: for filename in a... | 20,950 |
def main(): debug = 0 try: opts, args = getopt.getopt(sys.argv[1:], "d") except getopt.error, msg: sys.stderr.write("Error: %s\n" % str(msg)) sys.exit(2) for o, a in opts: if o == "-d": debug = 1 global flist, root root = Tk() fixwordbreaks(root) root.withdraw() flist = PyShellFileList(root) if args: for filename in sy... | def main(): debug = 0 try: opts, args = getopt.getopt(sys.argv[1:], "d") except getopt.error, msg: sys.stderr.write("Error: %s\n" % str(msg)) sys.exit(2) for o, a in opts: if o == "-d": debug = 1 global flist, root root = Tk() fixwordbreaks(root) root.withdraw() flist = PyShellFileList(root) if args: for filename in sy... | 20,951 |
def main(): debug = 0 try: opts, args = getopt.getopt(sys.argv[1:], "d") except getopt.error, msg: sys.stderr.write("Error: %s\n" % str(msg)) sys.exit(2) for o, a in opts: if o == "-d": debug = 1 global flist, root root = Tk() fixwordbreaks(root) root.withdraw() flist = PyShellFileList(root) if args: for filename in sy... | def main(): debug = 0 try: opts, args = getopt.getopt(sys.argv[1:], "d") except getopt.error, msg: sys.stderr.write("Error: %s\n" % str(msg)) sys.exit(2) for o, a in opts: if o == "-d": debug = 1 global flist, root root = Tk() fixwordbreaks(root) root.withdraw() flist = PyShellFileList(root) if args: for filename in sy... | 20,952 |
def _putline(self, line): #if self._debugging > 1: print '*put*', `line` self.sock.send('%s%s' % (line, CRLF)) | defif self._debugging > 1: print '*put*', `line` _putline(self,if self._debugging > 1: print '*put*', `line` line):if self._debugging > 1: print '*put*', `line` #ifif self._debugging > 1: print '*put*', `line` self._debuggingif self._debugging > 1: print '*put*', `line` >if self._debugging > 1: print '*put*', `line` 1:... | 20,953 |
def _putcmd(self, line): #if self._debugging: print '*cmd*', `line` self._putline(line) | defif self._debugging: print '*cmd*', `line` _putcmd(self,if self._debugging: print '*cmd*', `line` line):if self._debugging: print '*cmd*', `line` #ifif self._debugging: print '*cmd*', `line` self._debugging:if self._debugging: print '*cmd*', `line` printif self._debugging: print '*cmd*', `line` '*cmd*',if self._debug... | 20,954 |
def _getline(self): line = self.file.readline() #if self._debugging > 1: print '*get*', `line` if not line: raise error_proto('-ERR EOF') octets = len(line) # server can send any combination of CR & LF # however, 'readline()' returns lines ending in LF # so only possibilities are ...LF, ...CRLF, CR...LF if line[-2:] ==... | defif self._debugging > 1: print '*get*', `line` _getline(self):if self._debugging > 1: print '*get*', `line` lineif self._debugging > 1: print '*get*', `line` =if self._debugging > 1: print '*get*', `line` self.file.readline()if self._debugging > 1: print '*get*', `line` #ifif self._debugging > 1: print '*get*', `line... | 20,955 |
def _getresp(self): resp, o = self._getline() #if self._debugging > 1: print '*resp*', `resp` c = resp[:1] if c != '+': raise error_proto(resp) return resp | defif self._debugging > 1: print '*resp*', `resp` _getresp(self):if self._debugging > 1: print '*resp*', `resp` resp,if self._debugging > 1: print '*resp*', `resp` oif self._debugging > 1: print '*resp*', `resp` =if self._debugging > 1: print '*resp*', `resp` self._getline()if self._debugging > 1: print '*resp*', `resp... | 20,956 |
def stat(self): """Get mailbox status. | defif self._debugging: print '*stat*', `rets` stat(self):if self._debugging: print '*stat*', `rets` """Getif self._debugging: print '*stat*', `rets` mailboxif self._debugging: print '*stat*', `rets` status. | 20,957 |
def extract(s): res = decoder.match(s) if res is None: raise NotANumber, s sign, intpart, fraction, exppart = res.group(1,2,3,4) if sign == '+': sign = '' if fraction: fraction = fraction[1:] if exppart: expo = eval(exppart[1:]) else: expo = 0 return sign, intpart, fraction, expo | def extract(s): res = decoder.match(s) if res is None: raise NotANumber, s sign, intpart, fraction, exppart = res.group(1,2,3,4) if sign == '+': sign = '' if fraction: fraction = fraction[1:] if exppart: expo = int(exppart[1:]) else: expo = 0 return sign, intpart, fraction, expo | 20,958 |
def AskFileForSave(**args): default_flags = 0x07 args, tpwanted = _process_Nav_args(args, _ALLOWED_KEYS, default_flags) try: rr = Nav.NavPutFile(args) good = 1 except Nav.error, arg: if arg[0] != -128: # userCancelledErr raise Nav.error, arg return None if not rr.validRecord or not rr.selection: return None if issubcla... | def AskFileForSave(**args): default_flags = 0x07 args, tpwanted = _process_Nav_args(args, _ALLOWED_KEYS, default_flags) try: rr = Nav.NavPutFile(args) good = 1 except Nav.error, arg: if arg[0] != -128: # userCancelledErr raise Nav.error, arg return None if not rr.validRecord or not rr.selection: return None if issubcla... | 20,959 |
def unpack_double(self): # XXX i = self.pos self.pos = j = i+8 data = self.buf[i:j] if len(data) < 8: raise EOFError return struct.unpack('8', data)[0] | def unpack_double(self): # XXX i = self.pos self.pos = j = i+8 data = self.buf[i:j] if len(data) < 8: raise EOFError return struct.unpack('8', data)[0] | 20,960 |
def readline(self, size=-1): """Read a line with approx. size. If size is negative, read a whole line. readline() and read() must not be mixed up (!). """ if size < 0: size = sys.maxint | def readline(self, size=-1): """Read a line with approx. size. If size is negative, read a whole line. readline() and read() must not be mixed up (!). """ if size < 0: size = sys.maxint | 20,961 |
def readline(self, size=-1): """Read a line with approx. size. If size is negative, read a whole line. readline() and read() must not be mixed up (!). """ if size < 0: size = sys.maxint | def readline(self, size=-1): """Read a line with approx. size. If size is negative, read a whole line. readline() and read() must not be mixed up (!). """ if size < 0: size = sys.maxint | 20,962 |
def initialize(self): self.__paths = [] if os.environ.has_key("MSSdk") and self.find_exe("cl.exe"): # Assume that the SDK set up everything alright; don't try to be # smarter self.cc = "cl.exe" self.linker = "link.exe" self.lib = "lib.exe" self.rc = "rc.exe" self.mc = "mc.exe" else: self.__paths = self.get_msvc_paths("... | def initialize(self): self.__paths = [] if os.environ.has_key("DISTUTILS_USE_SDK") and os.environ.has_key("MSSdk") and self.find_exe("cl.exe"): # Assume that the SDK set up everything alright; don't try to be # smarter self.cc = "cl.exe" self.linker = "link.exe" self.lib = "lib.exe" self.rc = "rc.exe" self.mc = "mc.exe... | 20,963 |
def __init__(self, editwin): self.editwin = editwin text = editwin.text text.bind("<<run-module>>", self.run_module) text.bind("<<run-script>>", self.run_script) text.bind("<<new-shell>>", self.new_shell) | def __init__(self, editwin): self.editwin = editwin text = editwin.text text.bind("<<run-module>>", self.run_module) text.bind("<<run-script>>", self.run_script) text.bind("<<new-shell>>", self.new_shell) | 20,964 |
def run_module(self, event=None): filename = self.editwin.io.filename if not filename: tkMessageBox.showerror("No file name", "This window has no file name", master=self.editwin.text) return modname, ext = os.path.splitext(os.path.basename(filename)) try: mod = sys.modules[modname] except KeyError: mod = imp.new_module... | def run_module_event(self, event, debugger=None): if not self.editwin.get_saved(): tkMessageBox.showerror("Not saved", "Please save first!", master=self.editwin.text) self.editwin.text.focus_set() return filename = self.editwin.io.filename if not filename: tkMessageBox.showerror("No file name", "This window has no file... | 20,965 |
def run_module(self, event=None): filename = self.editwin.io.filename if not filename: tkMessageBox.showerror("No file name", "This window has no file name", master=self.editwin.text) return modname, ext = os.path.splitext(os.path.basename(filename)) try: mod = sys.modules[modname] except KeyError: mod = imp.new_module... | def run_module(self, event=None): filename = self.editwin.io.filename if not filename: tkMessageBox.showerror("No file name", "This window has no file name", master=self.editwin.text) return modname, ext = os.path.splitext(os.path.basename(filename)) if sys.modules.has_key(modname): mod = sys.modules[modname] except Ke... | 20,966 |
def run_module(self, event=None): filename = self.editwin.io.filename if not filename: tkMessageBox.showerror("No file name", "This window has no file name", master=self.editwin.text) return modname, ext = os.path.splitext(os.path.basename(filename)) try: mod = sys.modules[modname] except KeyError: mod = imp.new_module... | def run_module(self, event=None): filename = self.editwin.io.filename if not filename: tkMessageBox.showerror("No file name", "This window has no file name", master=self.editwin.text) return modname, ext = os.path.splitext(os.path.basename(filename)) try: mod = sys.modules[modname] else: mod = imp.new_module(modname) s... | 20,967 |
def run_module(self, event=None): filename = self.editwin.io.filename if not filename: tkMessageBox.showerror("No file name", "This window has no file name", master=self.editwin.text) return modname, ext = os.path.splitext(os.path.basename(filename)) try: mod = sys.modules[modname] except KeyError: mod = imp.new_module... | def run_module(self, event=None): filename = self.editwin.io.filename if not filename: tkMessageBox.showerror("No file name", "This window has no file name", master=self.editwin.text) return modname, ext = os.path.splitext(os.path.basename(filename)) try: mod = sys.modules[modname] except KeyError: mod = imp.new_module... | 20,968 |
def run_script(self, event=None): pass | def debug_module_event(self, event): import Debugger debugger = Debugger.Debugger(self) self.run_module_event(event, debugger) def close_debugger(self): pass | 20,969 |
def run_script(self, event=None): pass | def run_script(self, event=None): pass | 20,970 |
def build_extensions(self): | def build_extensions(self): | 20,971 |
def test_getstatus(self): # This pattern should match 'ls -ld /.' on any posix # system, however perversely configured. pat = r'''d......... # It is a directory. \s+\d+ # It has some number of links. \s+\w+\s+\w+ # It has a user and group, which may # be named anything. \s+\d+ # It has a size. [^/]* ... | def test_getstatus(self): # This pattern should match 'ls -ld /.' on any posix # system, however perversely configured. pat = r'''d......... # It is a directory. \s+\d+ ... | 20,972 |
def test_getstatus(self): # This pattern should match 'ls -ld /.' on any posix # system, however perversely configured. pat = r'''d......... # It is a directory. \s+\d+ # It has some number of links. \s+\w+\s+\w+ # It has a user and group, which may # be named anything. \s+\d+ # It has a size. [^/]* ... | def test_getstatus(self): # This pattern should match 'ls -ld /.' on any posix # system, however perversely configured. pat = r'''d......... # It is a directory. \s+\d+ # It has some number of links. \s+\w+\s+\w+ # It has a user and group, which may # be named anything. \s+\d+ # It has a size. [^/]* ... | 20,973 |
def putrequest(self, method, url): """Send a request to the server. | def putrequest(self, method, url, skip_host=0): """Send a request to the server. | 20,974 |
def putrequest(self, method, url): """Send a request to the server. | def putrequest(self, method, url): """Send a request to the server. | 20,975 |
def _send_request(self, method, url, body, headers): self.putrequest(method, url) | def _send_request(self, method, url, body, headers): self.putrequest(method, url) | 20,976 |
def find_paragraph(text, mark): lineno, col = map(int, string.split(mark, ".")) line = text.get("%d.0" % lineno, "%d.0 lineend" % lineno) while is_all_white(line): lineno = lineno + 1 line = text.get("%d.0" % lineno, "%d.0 lineend" % lineno) first_lineno = lineno while not is_all_white(line): lineno = lineno + 1 line =... | def find_paragraph(text, mark): lineno, col = map(int, string.split(mark, ".")) line = text.get("%d.0" % lineno, "%d.0 lineend" % lineno) while is_all_white(line): lineno = lineno + 1 line = text.get("%d.0" % lineno, "%d.0 lineend" % lineno) first_lineno = lineno while lineno > 0 and not is_all_white(line): lineno = li... | 20,977 |
def test_one(n): global mutate, dict1, dict2, dict1keys, dict2keys # Fill the dicts without mutating them. mutate = 0 dict1keys = fill_dict(dict1, range(n), n) dict2keys = fill_dict(dict2, range(n), n) # Enable mutation, then compare the dicts so long as they have the # same size. mutate = 1 if verbose: print "trying... | def test_one(n): global mutate, dict1, dict2, dict1keys, dict2keys # Fill the dicts without mutating them. mutate = 0 dict1keys = fill_dict(dict1, range(n), n) dict2keys = fill_dict(dict2, range(n), n) # Enable mutation, then compare the dicts so long as they have the # same size. mutate = 1 if verbose: print "trying... | 20,978 |
def urlunparse((scheme, netloc, url, params, query, fragment)): if netloc: if url[:1] != '/': url = '/' + url url = '//' + netloc + url if scheme: url = scheme + ':' + url if params: url = url + ';' + params if query: url = url + '?' + query if fragment: url = url + '#' + fragment return url | def urlunparse((scheme, netloc, url, params, query, fragment)): if netloc or (scheme in uses_netloc and url[:2] == '//'): if url[:1] != '/': url = '/' + url url = '//' + netloc + url if scheme: url = scheme + ':' + url if params: url = url + ';' + params if query: url = url + '?' + query if fragment: url = url + '#' + ... | 20,979 |
def urlunparse((scheme, netloc, url, params, query, fragment)): if netloc: if url[:1] != '/': url = '/' + url url = '//' + netloc + url if scheme: url = scheme + ':' + url if params: url = url + ';' + params if query: url = url + '?' + query if fragment: url = url + '#' + fragment return url | def urlunparse((scheme, netloc, url, params, query, fragment)): if netloc: if url[:1] != '/': url = '/' + url url = '//' + (netloc or '') + url if scheme: url = scheme + ':' + url if params: url = url + ';' + params if query: url = url + '?' + query if fragment: url = url + '#' + fragment return url | 20,980 |
def groups(self): | def groups(self): | 20,981 |
def getproxies_registry(): """Return a dictionary of scheme -> proxy server URL mappings. | def getproxies_registry(): """Return a dictionary of scheme -> proxy server URL mappings. | 20,982 |
def __index__(self): return self.ind | def __index__(self): return self.ind | 20,983 |
def setUp(self): self.seq = [0,10,20,30,40,50] self.o = oldstyle() self.n = newstyle() self.o2 = oldstyle() self.n2 = newstyle() | def setUp(self): self.o = oldstyle() self.n = newstyle() self.o2 = oldstyle() self.n2 = newstyle() | 20,984 |
def setUp(self): self.seq = [0,10,20,30,40,50] self.o = oldstyle() self.n = newstyle() self.o2 = oldstyle() self.n2 = newstyle() | def setUp(self): self.seq = [0,10,20,30,40,50] self.o = oldstyle() self.n = newstyle() self.o2 = oldstyle() self.n2 = newstyle() | 20,985 |
def test_slice(self): self.o.ind = 1 self.o2.ind = 3 self.n.ind = 2 self.n2.ind = 4 assert(self.seq[self.o:self.o2] == self.seq[1:3]) assert(self.seq[self.n:self.n2] == self.seq[2:4]) | def test_slice(self): self.o.ind = 1 self.o2.ind = 3 self.n.ind = 2 self.n2.ind = 4 assert(self.seq[self.o:self.o2] == self.seq[1:3]) assert(self.seq[self.n:self.n2] == self.seq[2:4]) | 20,986 |
def test_basic(self): self.o.ind = -2 self.n.ind = 2 assert(self.seq[self.n] == self.seq[2]) assert(self.seq[self.o] == self.seq[-2]) assert(operator.index(self.o) == -2) assert(operator.index(self.n) == 2) | class ListTestCase(BaseTestCase): seq = [0,10,20,30,40,50] def test_setdelitem(self): self.o.ind = -2 self.n.ind = 2 assert(self.seq[self.n] == self.seq[2]) assert(self.seq[self.o] == self.seq[-2]) assert(operator.index(self.o) == -2) assert(operator.index(self.n) == 2) | 20,987 |
def test_basic(self): self.o.ind = -2 self.n.ind = 2 assert(self.seq[self.n] == self.seq[2]) assert(self.seq[self.o] == self.seq[-2]) assert(operator.index(self.o) == -2) assert(operator.index(self.n) == 2) | def test_basic(self): self.o.ind = -2 self.n.ind = 2 assert(self.seq[self.n] == self.seq[2]) assert(self.seq[self.o] == self.seq[-2]) assert(operator.index(self.o) == -2) assert(operator.index(self.n) == 2) | 20,988 |
def test_error(self): self.o.ind = 'dumb' self.n.ind = 'bad' myfunc = lambda x, obj: obj.seq[x] self.failUnlessRaises(TypeError, operator.index, self.o) self.failUnlessRaises(TypeError, operator.index, self.n) self.failUnlessRaises(TypeError, myfunc, self.o, self) self.failUnlessRaises(TypeError, myfunc, self.n, self) | def test_error(self): self.o.ind = 'dumb' self.n.ind = 'bad' myfunc = lambda x, obj: obj.seq[x] self.failUnlessRaises(TypeError, operator.index, self.o) self.failUnlessRaises(TypeError, operator.index, self.n) self.failUnlessRaises(TypeError, myfunc, self.o, self) self.failUnlessRaises(TypeError, myfunc, self.n, self) | 20,989 |
def test_slice(self): self.o.ind = 1 self.o2.ind = 3 self.n.ind = 2 self.n2.ind = 4 assert(self.seq[self.o:self.o2] == self.seq[1:3]) assert(self.seq[self.n:self.n2] == self.seq[2:4]) | def test_slice(self): self.o.ind = 1 self.o2.ind = 3 self.n.ind = 2 self.n2.ind = 4 assert(self.seq[self.o:self.o2] == self.seq[1:3]) assert(self.seq[self.n:self.n2] == self.seq[2:4]) | 20,990 |
def test_main(): test_support.run_unittest( ListTestCase, TupleTestCase, StringTestCase, UnicodeTestCase ) | def test_main(): test_support.run_unittest( ListTestCase, TupleTestCase, StringTestCase, UnicodeTestCase, XRangeTestCase, ) | 20,991 |
def escape(pattern): "Escape all non-alphanumeric characters in pattern." result = [] alphanum=string.letters+'_'+string.digits for char in pattern: if char not in alphanum: result.append('\\') result.append(char) return string.join(result, '') | def escape(pattern): "Escape all non-alphanumeric characters in pattern." result = [] alphanum=string.letters+'_'+string.digits for char in pattern: if char not in alphanum: if char == '\000': result.append(r'\000') else: result.append('\\' + char) else: result.append(char) return string.join(result, '') | 20,992 |
def _execute_child(self, args, executable, preexec_fn, close_fds, cwd, env, universal_newlines, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite): """Execute program (MS Windows version)""" | def _execute_child(self, args, executable, preexec_fn, close_fds, cwd, env, universal_newlines, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite): """Execute program (MS Windows version)""" | 20,993 |
def disassemble(co, lasti=-1): """Disassemble a code object.""" code = co.co_code labels = findlabels(code) n = len(code) i = 0 while i < n: c = code[i] op = ord(c) if op == SET_LINENO and i > 0: print # Extra blank line if i == lasti: print '-->', else: print ' ', if i in labels: print '>>', else: print ' ', print ... | def disassemble(co, lasti=-1): """Disassemble a code object.""" code = co.co_code labels = findlabels(code) n = len(code) i = 0 while i < n: c = code[i] op = ord(c) if op == SET_LINENO and i > 0: print # Extra blank line if i == lasti: print '-->', else: print ' ', if i in labels: print '>>', else: print ' ', print ... | 20,994 |
def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, fromfile=None, findleaks=0, use_resources=None): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdi... | def main(tests=None, testdir=None, verbose=0, quiet=False, generate=False, exclude=False, single=False, randomize=False, fromfile=None, findleaks=False, use_resources=None, trace=False): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings co... | 20,995 |
def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, fromfile=None, findleaks=0, use_resources=None): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdi... | def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, fromfile=None, findleaks=0, use_resources=None): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdi... | 20,996 |
def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, fromfile=None, findleaks=0, use_resources=None): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdi... | def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, fromfile=None, findleaks=0, use_resources=None): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdi... | 20,997 |
def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, fromfile=None, findleaks=0, use_resources=None): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdi... | def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, fromfile=None, findleaks=0, use_resources=None): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdi... | 20,998 |
def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, fromfile=None, findleaks=0, use_resources=None): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdi... | def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, fromfile=None, findleaks=0, use_resources=None): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdi... | 20,999 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.