rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
while not l: reactor.iterate(0.1) | util.spinWhile(lambda :not l) | def lineReceived(self, line): self.factory.line = line | a79e9f9c61953c867382db060dfde03dbf771dc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a79e9f9c61953c867382db060dfde03dbf771dc3/test_application.py |
while not l: reactor.iterate(0.1) | util.spinWhile(lambda :not l) | def testStoppingServer(self): if not interfaces.IReactorUNIX(reactor, None): raise unittest.SkipTest, "This reactor does not support UNIX domain sockets" factory = protocol.ServerFactory() factory.protocol = wire.Echo t = internet.UNIXServer('echo.skt', factory) t.startService() t.stopService() self.failIf(t.running) f... | a79e9f9c61953c867382db060dfde03dbf771dc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a79e9f9c61953c867382db060dfde03dbf771dc3/test_application.py |
timeout = 30 | def testTimer(self): timeout = 30 l = [] t = internet.TimerService(1, l.append, "hello") t.startService() while not l: reactor.iterate(0.1) timeout -= 1 self.failIf(timeout == 0) t.stopService() self.failIf(t.running) self.assertEqual(l, ["hello"]) l.pop() | a79e9f9c61953c867382db060dfde03dbf771dc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a79e9f9c61953c867382db060dfde03dbf771dc3/test_application.py | |
while not l: reactor.iterate(0.1) timeout -= 1 self.failIf(timeout == 0) | util.spinWhile(lambda :not l, timeout=30) | def testTimer(self): timeout = 30 l = [] t = internet.TimerService(1, l.append, "hello") t.startService() while not l: reactor.iterate(0.1) timeout -= 1 self.failIf(timeout == 0) t.stopService() self.failIf(t.running) self.assertEqual(l, ["hello"]) l.pop() | a79e9f9c61953c867382db060dfde03dbf771dc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a79e9f9c61953c867382db060dfde03dbf771dc3/test_application.py |
timeout = 30 t.startService() while not l: reactor.iterate(0.1) timeout -= 1 self.failIf(timeout == 0) | t.startService() util.spinWhile(lambda :not l, timeout=30) | def testTimer(self): timeout = 30 l = [] t = internet.TimerService(1, l.append, "hello") t.startService() while not l: reactor.iterate(0.1) timeout -= 1 self.failIf(timeout == 0) t.stopService() self.failIf(t.running) self.assertEqual(l, ["hello"]) l.pop() | a79e9f9c61953c867382db060dfde03dbf771dc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a79e9f9c61953c867382db060dfde03dbf771dc3/test_application.py |
timeout = 30 | def testTimer(self): timeout = 30 l = [] t = internet.TimerService(1, l.append, "hello") t.startService() while not l: reactor.iterate(0.1) timeout -= 1 self.failIf(timeout == 0) t.stopService() self.failIf(t.running) self.assertEqual(l, ["hello"]) l.pop() | a79e9f9c61953c867382db060dfde03dbf771dc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a79e9f9c61953c867382db060dfde03dbf771dc3/test_application.py | |
while len(l)<10: reactor.iterate(0.1) timeout -= 1 self.failIf(timeout == 0) | util.spinWhile(lambda :len(l) < 10, timeout=30) | def testTimer(self): timeout = 30 l = [] t = internet.TimerService(1, l.append, "hello") t.startService() while not l: reactor.iterate(0.1) timeout -= 1 self.failIf(timeout == 0) t.stopService() self.failIf(t.running) self.assertEqual(l, ["hello"]) l.pop() | a79e9f9c61953c867382db060dfde03dbf771dc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a79e9f9c61953c867382db060dfde03dbf771dc3/test_application.py |
timeout = 30 t.startService() while t._loop.running: reactor.iterate(0.1) timeout -= 1 self.failIf(timeout == 0) | t.startService() util.spinWhile(lambda :t._loop.running, timeout=30) | def testBrokenTimer(self): t = internet.TimerService(1, lambda: 1 / 0) timeout = 30 t.startService() while t._loop.running: reactor.iterate(0.1) timeout -= 1 self.failIf(timeout == 0) t.stopService() self.assertEquals([ZeroDivisionError], [o.value.__class__ for o in log.flushErrors(ZeroDivisionError)]) | a79e9f9c61953c867382db060dfde03dbf771dc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a79e9f9c61953c867382db060dfde03dbf771dc3/test_application.py |
if not request.prepath[-1] == '' and self.addSlash: | if self.addSlash and request.prepath[-1] != '' and request.prepath[-1] != 'index.rpy': | def render(self, request): """ Trigger any inputhandlers that were passed in to this Page, then delegate to the View for traversing the DOM. Finally, call gatheredControllers to deal with any InputHandlers that were constructed from any controller= tags in the DOM. gatheredControllers will render the page to the browse... | 4916c06d8fb187036d2d17f1c90871331559a870 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4916c06d8fb187036d2d17f1c90871331559a870/controller.py |
from twisted.internet import defer from twisted.python import failure defer.Deferred.debug = True failure.startDebugMode() | def seeWarnings(x): if x.has_key('warning'): print print x['format'] % x | 50a5c7783a8ed7dbd93ffd01639dc8b8aa8c461e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/50a5c7783a8ed7dbd93ffd01639dc8b8aa8c461e/trial.py | |
print "error parsing remote-interface attributes in %s" % iname | def __init__(self, iname, bases=(), attrs=None, __module__=None): if attrs is None: interface.InterfaceClass.__init__(self, iname, bases, attrs, __module__) return | a7ff2851e68ecec1ffcab8127d0144a4951b3772 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a7ff2851e68ecec1ffcab8127d0144a4951b3772/remoteinterface.py | |
print "error registering RemoteInterface '%s'" % rname | def __init__(self, iname, bases=(), attrs=None, __module__=None): if attrs is None: interface.InterfaceClass.__init__(self, iname, bases, attrs, __module__) return | a7ff2851e68ecec1ffcab8127d0144a4951b3772 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a7ff2851e68ecec1ffcab8127d0144a4951b3772/remoteinterface.py | |
def __init__(self): pass | def __init__(self): pass | 8a200e74bea2fe385e2d07999447d7dffb53bffc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/8a200e74bea2fe385e2d07999447d7dffb53bffc/cursesclient.py | |
reactor.addReader(screen) | reactor.addReader(screen) | def close(self): """ clean up """ | 8a200e74bea2fe385e2d07999447d7dffb53bffc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/8a200e74bea2fe385e2d07999447d7dffb53bffc/cursesclient.py |
responses = PropStatResponseQueue("PROPPATCH", request.uri, responsecode.NO_CONTENT) | responses = ResponseQueue(self.fp.path, "PROPPATCH", responsecode.NO_CONTENT) | def gotXML(doc): if doc is None: error = "Request XML body is required." log.err(error) return StatusResponse(responsecode.BAD_REQUEST, error) | 427bc5216a4f69af0f306e8ce145b4a2eea730a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/427bc5216a4f69af0f306e8ce145b4a2eea730a6/proppatch.py |
got_an_error = [False] | def gotXML(doc): if doc is None: error = "Request XML body is required." log.err(error) return StatusResponse(responsecode.BAD_REQUEST, error) | 427bc5216a4f69af0f306e8ce145b4a2eea730a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/427bc5216a4f69af0f306e8ce145b4a2eea730a6/proppatch.py | |
def do(action, property): | def do(action, property, request): | def do(action, property): # # Perform action(property, request) while maintaining an # undo queue. # if self.hasProperty(property, request): old_property = self.readProperty(property, request) def undo(): self.writeProperty(old_property, request) else: def undo(): self.removeProperty(property, request) | 427bc5216a4f69af0f306e8ce145b4a2eea730a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/427bc5216a4f69af0f306e8ce145b4a2eea730a6/proppatch.py |
def do(action, property): # # Perform action(property, request) while maintaining an # undo queue. # if self.hasProperty(property, request): old_property = self.readProperty(property, request) def undo(): self.writeProperty(old_property, request) else: def undo(): self.removeProperty(property, request) | 427bc5216a4f69af0f306e8ce145b4a2eea730a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/427bc5216a4f69af0f306e8ce145b4a2eea730a6/proppatch.py | ||
propitem = davxml.lookupElement(property.qname())() except KeyError: class UnknownElement (davxml.WebDAVUnknownElement): namespace = property.qname()[0] name = property.qname()[1] propitem = UnknownElement() | action(property, request) except: responses.add(self.fp.path, Failure()) else: responses.add(self.fp.path, responsecode.OK) | def undo(): self.removeProperty(property, request) | 427bc5216a4f69af0f306e8ce145b4a2eea730a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/427bc5216a4f69af0f306e8ce145b4a2eea730a6/proppatch.py |
try: action(property, request) except ValueError, e: responses.add(Failure(exc_value=HTTPError(StatusResponse(responsecode.FORBIDDEN, str(e)))), davxml.PropertyContainer(propitem)) got_an_error[0] = True except: responses.add(Failure(), davxml.PropertyContainer(propitem)) got_an_error[0] = True else: responses.add(res... | undo_actions.append(undo) | def undo(): self.removeProperty(property, request) | 427bc5216a4f69af0f306e8ce145b4a2eea730a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/427bc5216a4f69af0f306e8ce145b4a2eea730a6/proppatch.py |
do(self.writeProperty, property) | do(self.writeProperty, property, request) | def undo(): self.removeProperty(property, request) | 427bc5216a4f69af0f306e8ce145b4a2eea730a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/427bc5216a4f69af0f306e8ce145b4a2eea730a6/proppatch.py |
do(self.removeProperty, property) | do(self.removeProperty, property, request) | def undo(): self.removeProperty(property, request) | 427bc5216a4f69af0f306e8ce145b4a2eea730a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/427bc5216a4f69af0f306e8ce145b4a2eea730a6/proppatch.py |
if got_an_error[0]: for action in undo_actions: action() responses.error() | def undo(): self.removeProperty(property, request) | 427bc5216a4f69af0f306e8ce145b4a2eea730a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/427bc5216a4f69af0f306e8ce145b4a2eea730a6/proppatch.py | |
return MultiStatusResponse([responses.response()]) | return responses.response() | def undo(): self.removeProperty(property, request) | 427bc5216a4f69af0f306e8ce145b4a2eea730a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/427bc5216a4f69af0f306e8ce145b4a2eea730a6/proppatch.py |
log.msg("Error, gtk doIteration() only supports delay of 0") gtk.mainiteration() | time.sleep(delay) gtk.mainiteration(0) | def doIteration(self, delay=0.0): if delay != 0: log.msg("Error, gtk doIteration() only supports delay of 0") gtk.mainiteration() | 75b1765d5873ffbeeadd2a889fd326eea2bf41b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/75b1765d5873ffbeeadd2a889fd326eea2bf41b0/gtkreactor.py |
methods = [] cbNames = [] if condition & gtk.GDK.INPUT_READ: methods.append(getattr(source, 'doRead')) cbNames.append('doRead') if (condition & gtk.GDK.INPUT_WRITE): method = getattr(source, 'doWrite') if not (method in methods): methods.append(method) cbNames.append('doWrite') for method, cbName in zip(methods, cb... | log.logOwner.own(source) why = None if 0: pass else: | def callback(self, source, condition): methods = [] cbNames = [] | 75b1765d5873ffbeeadd2a889fd326eea2bf41b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/75b1765d5873ffbeeadd2a889fd326eea2bf41b0/gtkreactor.py |
why = method() | didRead = None if condition & gtk.GDK.INPUT_READ: why = source.doRead() didRead = source.doRead if not why and condition & gtk.GDK.INPUT_WRITE: if not source.disconnected and source.doWrite != didRead: why = source.doWrite() | def callback(self, source, condition): methods = [] cbNames = [] | 75b1765d5873ffbeeadd2a889fd326eea2bf41b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/75b1765d5873ffbeeadd2a889fd326eea2bf41b0/gtkreactor.py |
log.msg('Error In %s.%s' %(source,cbName)) | log.msg('Error In %s' % source) | def callback(self, source, condition): methods = [] cbNames = [] | 75b1765d5873ffbeeadd2a889fd326eea2bf41b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/75b1765d5873ffbeeadd2a889fd326eea2bf41b0/gtkreactor.py |
if why: try: source.connectionLost(failure.Failure(why)) except: log.deferr() self.removeReader(source) self.removeWriter(source) break elif source.disconnected: break self.simulate() | if why: self.removeReader(source) self.removeWriter(source) try: source.connectionLost(failure.Failure(why)) except: log.deferr() log.logOwner.disown(source) self.simulate() return 1 | def callback(self, source, condition): methods = [] cbNames = [] | 75b1765d5873ffbeeadd2a889fd326eea2bf41b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/75b1765d5873ffbeeadd2a889fd326eea2bf41b0/gtkreactor.py |
def do(self, *args, **kw): """(internal) action method. """ self.cached.remoteCacheDo(self.broker, self.name, self.perspective, args, kw) | 300311caf88162f2d1a6b0df9e3c0a2c1b2a3906 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/300311caf88162f2d1a6b0df9e3c0a2c1b2a3906/pb.py | ||
def __repr__(self): return "<RemoteCacheObserver(%s, %s, %s) at %s>" % ( self.broker, self.cached, self.perspective, id(self)) | 300311caf88162f2d1a6b0df9e3c0a2c1b2a3906 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/300311caf88162f2d1a6b0df9e3c0a2c1b2a3906/pb.py | ||
def __hash__(self): """generate a hash unique to all RemoteCacheObservers for this broker/perspective/cached triplet """ return ( (hash(self.broker) % 2**10) + (hash(self.perspective) % 2**10) + (hash(self.cached) % 2**10)) | 300311caf88162f2d1a6b0df9e3c0a2c1b2a3906 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/300311caf88162f2d1a6b0df9e3c0a2c1b2a3906/pb.py | ||
def __cmp__(self, other): """compare me to another RemoteCacheObserver """ return cmp((self.broker, self.perspective, self.cached), other) | 300311caf88162f2d1a6b0df9e3c0a2c1b2a3906 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/300311caf88162f2d1a6b0df9e3c0a2c1b2a3906/pb.py | ||
def getStateToCacheAndObserveFor(self, perspective, observer): """Get state to cache on the client and client-cache reference to observe locally. | 300311caf88162f2d1a6b0df9e3c0a2c1b2a3906 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/300311caf88162f2d1a6b0df9e3c0a2c1b2a3906/pb.py | ||
def __del__(self): """Do distributed reference counting on finalization. """ if self.doRefCount: self.broker.sendDecRef(self.luid) | 300311caf88162f2d1a6b0df9e3c0a2c1b2a3906 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/300311caf88162f2d1a6b0df9e3c0a2c1b2a3906/pb.py | ||
or None if | or None if | def localObjectForID(self, luid): """Get a local object for a locally unique ID. | 300311caf88162f2d1a6b0df9e3c0a2c1b2a3906 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/300311caf88162f2d1a6b0df9e3c0a2c1b2a3906/pb.py |
def remoteForName(self, name): """Returns an object from the remote name mapping. | 300311caf88162f2d1a6b0df9e3c0a2c1b2a3906 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/300311caf88162f2d1a6b0df9e3c0a2c1b2a3906/pb.py | ||
def cachedRemotelyAs(self, instance): """Returns an ID that says what this instance is cached as remotely, or None if it's not. """ puid = instance.processUniqueID() luid = self.remotelyCachedLUIDs.get(puid) if luid is not None: self.remotelyCachedObjects[luid].incref() return luid | 300311caf88162f2d1a6b0df9e3c0a2c1b2a3906 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/300311caf88162f2d1a6b0df9e3c0a2c1b2a3906/pb.py | ||
def proto_cachemessage(self, requestID, objectID, message, answerRequired, netArgs, netKw): self._recvMessage(self.cachedLocallyAs, requestID, objectID, message, answerRequired, netArgs, netKw) | 300311caf88162f2d1a6b0df9e3c0a2c1b2a3906 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/300311caf88162f2d1a6b0df9e3c0a2c1b2a3906/pb.py | ||
def remote_respond(self, response): if self.ident: if self.ident.verifyPassword(self.challenge, response): return IdentityWrapper(self.serv.broker, self.ident) | 300311caf88162f2d1a6b0df9e3c0a2c1b2a3906 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/300311caf88162f2d1a6b0df9e3c0a2c1b2a3906/pb.py | ||
def connectionLost(self): self.lost = True | 962f640cfd9c6141f77f6827404dba2b8352b203 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/962f640cfd9c6141f77f6827404dba2b8352b203/test_mail.py | ||
def _delayDeferred(self, time, arg=None): from twisted.internet import reactor d = defer.Deferred() reactor.callLater(time, d.callback, arg) return d | def _delayDeferred(self, time, arg=None): from twisted.internet import reactor d = defer.Deferred() reactor.callLater(time, d.callback, arg) return d | 52306392d6abc35015cf276049ec99e988be9592 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/52306392d6abc35015cf276049ec99e988be9592/test_tcp.py | |
client = self.client f = self.f client.transport.write("hello") w = client.transport.write client.transport.loseWriteConnection() d = self._delayDeferred(0.2, f.protocol) d.addCallback(lambda x : self.assertEqual(f.protocol.data, 'hello')) d.addCallback(lambda x : self.assertEqual(f.protocol.closed, True)) return d | """ TCP protocols support half-close connections, but not all of them support being notified of write closes. In this case, test that half-closing the connection causes the peer's connection to be closed. """ self.client.transport.write("hello") self.client.transport.loseWriteConnection() self.f.protocol.closedDeferre... | def testNoNotification(self): client = self.client f = self.f client.transport.write("hello") w = client.transport.write client.transport.loseWriteConnection() d = self._delayDeferred(0.2, f.protocol) d.addCallback(lambda x : self.assertEqual(f.protocol.data, 'hello')) d.addCallback(lambda x : self.assertEqual(f.protoc... | 52306392d6abc35015cf276049ec99e988be9592 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/52306392d6abc35015cf276049ec99e988be9592/test_tcp.py |
client = self.client f = self.f f.protocol.transport.loseConnection() client.transport.write("X") client.transport.loseWriteConnection() d = self._delayDeferred(0.2, f.protocol) d.addCallback(lambda x : self.failUnlessEqual(x.closed, True)) return d | """ If the other side has already closed its connection, loseWriteConnection should pass silently. """ self.f.protocol.transport.loseConnection() self.client.transport.write("X") self.client.transport.loseWriteConnection() self.f.protocol.closedDeferred = d = defer.Deferred() self.client.closedDeferred = d2 = defer.Def... | def testShutdownException(self): client = self.client f = self.f f.protocol.transport.loseConnection() client.transport.write("X") client.transport.loseWriteConnection() d = self._delayDeferred(0.2, f.protocol) d.addCallback(lambda x : self.failUnlessEqual(x.closed, True)) return d | 52306392d6abc35015cf276049ec99e988be9592 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/52306392d6abc35015cf276049ec99e988be9592/test_tcp.py |
in_ = 'foo\nhey hey $VER\nbar' | in_ = 'foo\nhey hey $VER\nbar\n' | def testReplaceInFile(self): in_ = 'foo\nhey hey $VER\nbar' outf = open('release.replace', 'w') outf.write(in_) outf.close() | 5b1543b87af217f843654018717d0522d3885a6a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5b1543b87af217f843654018717d0522d3885a6a/test_release.py |
request.setResponseCode(http.MOVED_PERMANENTLY) | request.setResponseCode(http.TEMPORARY_REDIRECT) | def configWidget(self, request): # displaying the widget path = request.postpath if path: obj = self.app for elem in path: if elem: # '' doesn't count obj = obj.getStaticEntity(elem) if obj is None: request.setResponseCode(http.MOVED_PERMANENTLY) request.setHeader('location', request.prePathURL()) return... | 3c35c04f37e70487c55eccda713e5067ff4397db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/3c35c04f37e70487c55eccda713e5067ff4397db/web.py |
address = ("127.0.0.1", 19939) | def __init__(self): """Initialize. """ log.msg("starting waker") # Following select_trigger (from asyncore)'s example; address = ("127.0.0.1", 19939) server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) client.setsockopt(socket.IPPROTO_TCP, 1, 1) server.b... | 89472f4a9bf91ca1c5c5cf9bd7f810c5eff62091 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/89472f4a9bf91ca1c5c5cf9bd7f810c5eff62091/default.py | |
server.bind(address) | server.bind(('127.0.0.1', 0)) | def __init__(self): """Initialize. """ log.msg("starting waker") # Following select_trigger (from asyncore)'s example; address = ("127.0.0.1", 19939) server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) client.setsockopt(socket.IPPROTO_TCP, 1, 1) server.b... | 89472f4a9bf91ca1c5c5cf9bd7f810c5eff62091 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/89472f4a9bf91ca1c5c5cf9bd7f810c5eff62091/default.py |
client.connect(address) | client.connect(server.getsockname()) | def __init__(self): """Initialize. """ log.msg("starting waker") # Following select_trigger (from asyncore)'s example; address = ("127.0.0.1", 19939) server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) client.setsockopt(socket.IPPROTO_TCP, 1, 1) server.b... | 89472f4a9bf91ca1c5c5cf9bd7f810c5eff62091 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/89472f4a9bf91ca1c5c5cf9bd7f810c5eff62091/default.py |
self.isFinished = 0 | self.stop = 0 | def __init__(self, source, extend ): """ This is the setup, the source argument is the iterator being wrapped, which exists in another thread. """ self.source = source self.isFinished = 0 self.failure = None self.buff = [] self.extend = extend | 7a17965f7f9d51bb2b40aa2d87a7456676424e64 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/7a17965f7f9d51bb2b40aa2d87a7456676424e64/flow.py |
from twisted.internet.reactor import callFromThread | def process(self): """ This is called in the 'source' thread, and just basically sucks the iterator, appending items back to the main thread. """ try: self.source.init() except: self.failure = failure.Failure() from twisted.internet.reactor import callFromThread try: while 1: val = self.source.next() if self.extend: se... | 7a17965f7f9d51bb2b40aa2d87a7456676424e64 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/7a17965f7f9d51bb2b40aa2d87a7456676424e64/flow.py | |
callFromThread(self.stop) | self.stop = 1 | def process(self): """ This is called in the 'source' thread, and just basically sucks the iterator, appending items back to the main thread. """ try: self.source.init() except: self.failure = failure.Failure() from twisted.internet.reactor import callFromThread try: while 1: val = self.source.next() if self.extend: se... | 7a17965f7f9d51bb2b40aa2d87a7456676424e64 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/7a17965f7f9d51bb2b40aa2d87a7456676424e64/flow.py |
def setFailure(self, failure): self.failure = failure def stop(self): self.isFinished = 1 | def setFailure(self, failure): self.failure = failure | 7a17965f7f9d51bb2b40aa2d87a7456676424e64 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/7a17965f7f9d51bb2b40aa2d87a7456676424e64/flow.py | |
if self.isFinished: | if self.stop: | def next(self): if self.buff: return self.buff.pop(0) if self.isFinished: raise StopIteration if self.failure: raise self.failure raise Cooperate() | 7a17965f7f9d51bb2b40aa2d87a7456676424e64 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/7a17965f7f9d51bb2b40aa2d87a7456676424e64/flow.py |
def getHost(self): """ Returns a tuple of ('INET', hostname, port), indicating the servers address """ return ('INET',)+self.socket.getsockname() | b9ff5288f911f85f9fadc77019f9905bcae83cfd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b9ff5288f911f85f9fadc77019f9905bcae83cfd/tcp.py | ||
interface = '' backlog = 5 | def getHost(self): """ Returns a tuple of ('INET', hostname, port), indicating the servers address """ return ('INET',)+self.socket.getsockname() | b9ff5288f911f85f9fadc77019f9905bcae83cfd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b9ff5288f911f85f9fadc77019f9905bcae83cfd/tcp.py | |
self.factory = factory self.backlog = backlog self.interface = interface | self.factory = factory self.backlog = backlog self.interface = interface | def __init__(self, port, factory, backlog=5, interface=''): """Initialize with a numeric port to listen on. """ self.port = port | b9ff5288f911f85f9fadc77019f9905bcae83cfd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b9ff5288f911f85f9fadc77019f9905bcae83cfd/tcp.py |
def __repr__(self): return "<%s on %s>" % (self.factory.__class__, self.port) | b9ff5288f911f85f9fadc77019f9905bcae83cfd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b9ff5288f911f85f9fadc77019f9905bcae83cfd/tcp.py | ||
def __setstate__(self, dct): if not dct.has_key('backlog'): dct['backlog'] = 5 self.__dict__.update(dct) | def __setstate__(self, dct): if not dct.has_key('backlog'): dct['backlog'] = 5 self.__dict__.update(dct) | b9ff5288f911f85f9fadc77019f9905bcae83cfd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b9ff5288f911f85f9fadc77019f9905bcae83cfd/tcp.py | |
def startListening(self): """Create and bind my socket, and begin listening on it. This is called on unserialization, and must be called after creating a server to begin listening on the specified port. """ log.msg("%s starting on %s"%(self.factory.__class__, self.port)) if type(self.port) == types.StringType: skt = s... | b9ff5288f911f85f9fadc77019f9905bcae83cfd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b9ff5288f911f85f9fadc77019f9905bcae83cfd/tcp.py | ||
def doRead(self): """Called when my socket is ready for reading. This accepts a connection and callse self.protocol() to handle the wire-level protocol. """ try: skt,addr = self.socket.accept() protocol = self.factory.buildProtocol(addr) s = self.sessionno self.sessionno = s+1 transport = self.transport(skt, protocol,... | b9ff5288f911f85f9fadc77019f9905bcae83cfd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b9ff5288f911f85f9fadc77019f9905bcae83cfd/tcp.py | ||
def loseConnection(self): """ Stop accepting connections on this port. This will shut down my socket and call self.connectionLost(). """ # Since ports can't, by definition, write any data, we can just close # instantly (no need for the more complex stuff for selectables which # write) removeReader(self) self.connectio... | b9ff5288f911f85f9fadc77019f9905bcae83cfd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b9ff5288f911f85f9fadc77019f9905bcae83cfd/tcp.py | ||
if not val: print "val is null; key is '%s'" % key | assert val is not None | def writexml(self, stream, indent='', addindent='', newl='', strip=0, nsprefixes={}, namespace=''): # write beginning ALLOWSINGLETON = ('img', 'br', 'hr', 'base', 'meta', 'link', 'param', 'area', 'input', 'col', 'basefont', 'isindex', 'frame') BLOCKELEMENTS = ('html', 'head', 'body', 'noscript', 'ins', 'del', 'h1', 'h2... | c3400948e4b84a189bcada598574ea9ac8a80d33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/c3400948e4b84a189bcada598574ea9ac8a80d33/microdom.py |
if not val: print "val is null; attr is '%s'" % attr | assert val is not None | def writexml(self, stream, indent='', addindent='', newl='', strip=0, nsprefixes={}, namespace=''): # write beginning ALLOWSINGLETON = ('img', 'br', 'hr', 'base', 'meta', 'link', 'param', 'area', 'input', 'col', 'basefont', 'isindex', 'frame') BLOCKELEMENTS = ('html', 'head', 'body', 'noscript', 'ins', 'del', 'h1', 'h2... | c3400948e4b84a189bcada598574ea9ac8a80d33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/c3400948e4b84a189bcada598574ea9ac8a80d33/microdom.py |
def __init__(self): """Initialize. """ resource.Resource.__init__(self) self.hosts = {} | 0e15c1ab7ab5f2007e55cb558c58ae5a9818c737 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0e15c1ab7ab5f2007e55cb558c58ae5a9818c737/vhost.py | ||
def addHost(self, name, resrc): """Add a host to this virtual host. This will take a host named `name', and map it to a resource `resrc'. For example, a setup for our virtual hosts would be:: nvh.addHost('divunal.com', divunalDirectory) nvh.addHost('www.divunal.com', divunalDirectory) nvh.addHost('twistedmatrix.com'... | 0e15c1ab7ab5f2007e55cb558c58ae5a9818c737 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0e15c1ab7ab5f2007e55cb558c58ae5a9818c737/vhost.py | ||
def addHost(self, name, resrc): """Add a host to this virtual host. This will take a host named `name', and map it to a resource `resrc'. For example, a setup for our virtual hosts would be:: nvh.addHost('divunal.com', divunalDirectory) nvh.addHost('www.divunal.com', divunalDirectory) nvh.addHost('twistedmatrix.com'... | 0e15c1ab7ab5f2007e55cb558c58ae5a9818c737 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0e15c1ab7ab5f2007e55cb558c58ae5a9818c737/vhost.py | ||
host = string.split(string.lower(request.getHeader('host')),':')[0] | hostHeader = request.getHeader('host') if hostHeader == None: return self.default or error.NoResource() else: host = string.split(string.lower(hostHeader),':')[0] | def _getResourceForRequest(self, request): """(Internal) Get the appropriate resource for the given host. """ host = string.split(string.lower(request.getHeader('host')),':')[0] return self.hosts.get(host, error.NoResource("host %s not in vhost map" % repr(host))) | 0e15c1ab7ab5f2007e55cb558c58ae5a9818c737 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0e15c1ab7ab5f2007e55cb558c58ae5a9818c737/vhost.py |
def _getResourceForRequest(self, request): """(Internal) Get the appropriate resource for the given host. """ host = string.split(string.lower(request.getHeader('host')),':')[0] return self.hosts.get(host, error.NoResource("host %s not in vhost map" % repr(host))) | 0e15c1ab7ab5f2007e55cb558c58ae5a9818c737 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0e15c1ab7ab5f2007e55cb558c58ae5a9818c737/vhost.py | ||
def render(self, request): """Implementation of resource.Resource's render method. """ resrc = self._getResourceForRequest(request) return resrc.render(request) | 0e15c1ab7ab5f2007e55cb558c58ae5a9818c737 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0e15c1ab7ab5f2007e55cb558c58ae5a9818c737/vhost.py | ||
why = getattr(selectable, method)() handfn = getattr(selectable, 'fileno', None) if not handfn: why = error.ConnectionFdescWentAway('Handler has no fileno method') elif handfn() == -1: why = error.ConnectionFdescWentAway('Filedescriptor went away') except: log.deferr() why = sys.exc_value if why: self.removeReader(sele... | def doSelect(self, timeout, # Since this loop should really be as fast as possible, # I'm caching these global attributes so the interpreter # will hit them in the local namespace. reads=reads, writes=writes, rhk=reads.has_key, whk=writes.has_key): """Run one iteration of the I/O monitor loop. | 12ffe518cfcf74668a769515e65265dfe3100505 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/12ffe518cfcf74668a769515e65265dfe3100505/default.py | |
selectable.connectionLost(failure.Failure(why)) | why = getattr(selectable, method)() handfn = getattr(selectable, 'fileno', None) if not handfn: why = _NO_FILENO elif handfn() == -1: why = _NO_FILEDESC | def doSelect(self, timeout, # Since this loop should really be as fast as possible, # I'm caching these global attributes so the interpreter # will hit them in the local namespace. reads=reads, writes=writes, rhk=reads.has_key, whk=writes.has_key): """Run one iteration of the I/O monitor loop. | 12ffe518cfcf74668a769515e65265dfe3100505 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/12ffe518cfcf74668a769515e65265dfe3100505/default.py |
log.logOwner.disown(selectable) | why = sys.exc_value if why: self.removeReader(selectable) self.removeWriter(selectable) try: selectable.connectionLost(failure.Failure(why)) except: log.deferr() finally: log.logOwner.disown(selectable) | def doSelect(self, timeout, # Since this loop should really be as fast as possible, # I'm caching these global attributes so the interpreter # will hit them in the local namespace. reads=reads, writes=writes, rhk=reads.has_key, whk=writes.has_key): """Run one iteration of the I/O monitor loop. | 12ffe518cfcf74668a769515e65265dfe3100505 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/12ffe518cfcf74668a769515e65265dfe3100505/default.py |
failed, or lost - see L{ClientFactory<twisted.internet.protocol.ServerFactory>} docs for details. | failed, or lost - see L{ClientFactory<twisted.internet.protocol.ClientFactory>} docs for details. | def connectTCP(self, host, port, factory, timeout=30, bindAddress=None): """Connect a TCP client. | e3596eb779b9594ad5b3bad489a324ff2b15bf15 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e3596eb779b9594ad5b3bad489a324ff2b15bf15/interfaces.py |
return defer.fail(error.ConchError('cannot do password auth')) | return defer.fail(error.ConchError('cannot do password auth')) | def verifyPlainPassword(self, password): if pwd: try: cryptedPass = pwd.getpwnam(self.name)[1] # password except KeyError: # no such user return defer.fail(error.ConchError('no such user')) else: if cryptedPass not in ['*', 'x']: ourCryptedPass = crypt.crypt(password, cryptedPass[:2]) if ourCryptedPass == cryptedPass: ... | fa379d84e9fb77fadef3f3f69bea77243ad6d213 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/fa379d84e9fb77fadef3f3f69bea77243ad6d213/identity.py |
return Todo(reason=str(value.value)) | return Todo(reason=value.getErrorMessage()) | def makeTodo(value): if isinstance(value, str): return Todo(reason=value) if isinstance(value, tuple): errors, reason = value try: errors = list(errors) except TypeError: errors = [errors] return Todo(reason=reason, errors=errors) if isinstance(value, failure.Failure): return Todo(reason=str(value.value)) | 48bd51f48bc7cd960ad2f4fc1f997780e93812a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/48bd51f48bc7cd960ad2f4fc1f997780e93812a3/unittest.py |
warnings.warn(("Do not raise unittest.SkipTest or " "unittest.TodoTest with no arguments! Give a reason " "for skipping tests!"), | warnings.warn(("Do not raise unittest.SkipTest with no " "arguments! Give a reason for skipping tests!"), | def _getReason(self, f): if len(f.value.args) > 0: reason = f.value.args[0] else: warnings.warn(("Do not raise unittest.SkipTest or " "unittest.TodoTest with no arguments! Give a reason " "for skipping tests!"), stacklevel=2) reason = f return reason | 48bd51f48bc7cd960ad2f4fc1f997780e93812a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/48bd51f48bc7cd960ad2f4fc1f997780e93812a3/unittest.py |
def pong(self, user, secs): """Called with the results of a CTCP PING query. | def topicUpdated(self, user, channel, newTopic): """In channel, user changed the topic to newTopic. Also called when first joining a channel. | def pong(self, user, secs): """Called with the results of a CTCP PING query. """ pass | 494b9d5f056c28f6e92951c0c9e52f9889d54b93 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/494b9d5f056c28f6e92951c0c9e52f9889d54b93/irc.py |
def signedOn(self): """Called after sucessfully signing on to the server. | def userRenamed(self, oldname, newname): """A user changed their name from oldname to newname. | def signedOn(self): """Called after sucessfully signing on to the server. """ pass | 494b9d5f056c28f6e92951c0c9e52f9889d54b93 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/494b9d5f056c28f6e92951c0c9e52f9889d54b93/irc.py |
def kickedFrom(self, channel, kicker, message): """Called when I am kicked from a channel. """ pass def userKicked(self, kickee, channel, kicker, message): | def receivedMOTD(self, motd): """I recieved a message-of-the-day banner from the server. motd is a list of strings, where each string was sent as a seperate message from the server. To display, you might want to use string.join(motd, '\n') to get a nicely formatted string. """ | def kickedFrom(self, channel, kicker, message): """Called when I am kicked from a channel. """ pass | 494b9d5f056c28f6e92951c0c9e52f9889d54b93 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/494b9d5f056c28f6e92951c0c9e52f9889d54b93/irc.py |
def topic(self, channel, topic): | def topic(self, channel, topic=None): """Attempt to set the topic of the given channel, or ask what it is. If topic is None, then I sent a topic query instead of trying to set the topic. The server should respond with a TOPIC message containing the current topic of the given channel. """ | def topic(self, channel, topic): # << TOPIC #xtestx :fff if channel[0] not in '&#!+': channel = '#' + channel self.sendLine("TOPIC %s :%s" % (channel, topic)) | 494b9d5f056c28f6e92951c0c9e52f9889d54b93 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/494b9d5f056c28f6e92951c0c9e52f9889d54b93/irc.py |
self.sendLine("TOPIC %s :%s" % (channel, topic)) | if topic != None: self.sendLine("TOPIC %s :%s" % (channel, topic)) else: self.sendLine("TOPIC %s" % (channel,)) | def topic(self, channel, topic): # << TOPIC #xtestx :fff if channel[0] not in '&#!+': channel = '#' + channel self.sendLine("TOPIC %s :%s" % (channel, topic)) | 494b9d5f056c28f6e92951c0c9e52f9889d54b93 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/494b9d5f056c28f6e92951c0c9e52f9889d54b93/irc.py |
self.joined(params[-1]) | self.joined(channel) else: self.userJoined(nick, channel) def irc_PART(self, prefix, params): nick = string.split(prefix,'!')[0] channel = params[-1] if nick == self.nickname: self.left(channel) else: self.userLeft(nick, channel) | def irc_JOIN(self, prefix, params): nick = string.split(prefix,'!')[0] if nick == self.nickname: self.joined(params[-1]) | 494b9d5f056c28f6e92951c0c9e52f9889d54b93 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/494b9d5f056c28f6e92951c0c9e52f9889d54b93/irc.py |
if nick == self.nickname: self.nickname = params[0] | if nick == self.nickname: self.nickname = params[0] else: self.userRenamed(nick, params[0]) | def irc_NICK(self, prefix, params): nick = string.split(prefix,'!',0)[0] if nick == self.nickname: self.nickname = params[0] | 494b9d5f056c28f6e92951c0c9e52f9889d54b93 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/494b9d5f056c28f6e92951c0c9e52f9889d54b93/irc.py |
__all__ = ['dict', 'inet_pton', 'inet_ntop', 'isinstance'] | __all__ = ['dict', 'inet_pton', 'inet_ntop', 'isinstance', 'True', 'False', 'bool'] | def isinstance(object, class_or_type_or_tuple): if type(class_or_type_or_tuple) == types.TupleType: for t in class_or_type_or_tuple: if __builtin__.isinstance(object, t): return 1 return 0 else: return __builtin__.isinstance(object, class_or_type_or_tuple) | f64711af541c49c019649b0510030fd740ad27e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f64711af541c49c019649b0510030fd740ad27e0/compat.py |
print 'Making ', os.path.join(dir, subdir) | def initializeMaildir(dir): if not os.path.isdir(dir): os.mkdir(dir) for subdir in ['new', 'cur', 'tmp', '.Trash']: print 'Making ', os.path.join(dir, subdir) os.mkdir(os.path.join(dir, subdir)) for subdir in ['new', 'cur', 'tmp']: print 'Making ', os.path.join(dir, '.Trash', subdir) os.mkdir(os.path.join(dir, '.Trash'... | f62141284f70e03e38c8b10f4f5067d1711d8d0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f62141284f70e03e38c8b10f4f5067d1711d8d0a/maildir.py | |
print 'Making ', os.path.join(dir, '.Trash', subdir) | def initializeMaildir(dir): if not os.path.isdir(dir): os.mkdir(dir) for subdir in ['new', 'cur', 'tmp', '.Trash']: print 'Making ', os.path.join(dir, subdir) os.mkdir(os.path.join(dir, subdir)) for subdir in ['new', 'cur', 'tmp']: print 'Making ', os.path.join(dir, '.Trash', subdir) os.mkdir(os.path.join(dir, '.Trash'... | f62141284f70e03e38c8b10f4f5067d1711d8d0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f62141284f70e03e38c8b10f4f5067d1711d8d0a/maildir.py | |
reactor.addSystemEventTrigger('after', 'startup', self.start) | main.callWhenRunning(self.start) | def __init__(self, *args, **kwargs): apply(threadpool.ThreadPool.__init__, (self,) + args, kwargs) reactor.addSystemEventTrigger('after', 'startup', self.start) self._callbacks = [] | b235d7f9f2276875ca0af4a75871e4ae1080114b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b235d7f9f2276875ca0af4a75871e4ae1080114b/threadtask.py |
theDispatcher = ThreadDispatcher(0) | theDispatcher = ThreadDispatcher() | def stop(self): log.msg("stopping thread dispatcher " +str(self)) threadpool.ThreadPool.stop(self) | b235d7f9f2276875ca0af4a75871e4ae1080114b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b235d7f9f2276875ca0af4a75871e4ae1080114b/threadtask.py |
return self._reportError(filename, dom, 'not exactly one title') | return self._reportError(filename, doc, 'not exactly one title') | def check_title(self, dom, filename): title = domhelpers.findNodesNamed(dom, 'title') if len(title)!=1: return self._reportError(filename, dom, 'not exactly one title') h1 = domhelpers.findNodesNamed(dom, 'h1') if len(h1)!=1: return self._reportError(filename, dom, 'not exactly one h1') if domhelpers.getNodeText(h1[0])... | 0dac1a5952d0ecdaa7f2d2a1045cbaa62f16e7cd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0dac1a5952d0ecdaa7f2d2a1045cbaa62f16e7cd/lint.py |
return self._reportError(filename, dom, 'not exactly one h1') | return self._reportError(filename, doc, 'not exactly one h1') | def check_title(self, dom, filename): title = domhelpers.findNodesNamed(dom, 'title') if len(title)!=1: return self._reportError(filename, dom, 'not exactly one title') h1 = domhelpers.findNodesNamed(dom, 'h1') if len(h1)!=1: return self._reportError(filename, dom, 'not exactly one h1') if domhelpers.getNodeText(h1[0])... | 0dac1a5952d0ecdaa7f2d2a1045cbaa62f16e7cd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0dac1a5952d0ecdaa7f2d2a1045cbaa62f16e7cd/lint.py |
r'(?P<date>.*)\s+(?P<filename>.*)\r?$' | r'(?P<date>... .. ..:..)\s+(?P<filename>.*?)\r?$' | def lineReceived(self, line): """(Private) Parses the response messages from the FTP server.""" # Add this line to the current response if self.debug: log.msg('--> %s' % line) line = string.rstrip(line) self.response.append(line) | e497b7a46118cd3e3c968cc96347ca5a1ef837c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e497b7a46118cd3e3c968cc96347ca5a1ef837c2/ftp.py |
dirListingPage = WidgetPage(DirectoryListing(self.path)) | dirListingPage = widgets.WidgetPage(DirectoryListing(self.path)) | def render(self, request): "You know what you doing." mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime =\ os.stat(self.path) | 9bd036e31e6c1f8e6d10936e447eda30efbd6a0b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9bd036e31e6c1f8e6d10936e447eda30efbd6a0b/static.py |
log.msg('real path for %s is %s' % (path, self._absPath(path))) | def realPath(self, path): log.msg('real path for %s is %s' % (path, self._absPath(path))) return self._absPath(path) | 97e254ff28fa5babf53ed96d1ca47222a6135361 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/97e254ff28fa5babf53ed96d1ca47222a6135361/unix.py | |
log.msg("%s %i" % (directory, len(self.files))) | def __init__(self, server, directory): self.server = server self.files = server.avatar._runAsUser(os.listdir, directory) log.msg("%s %i" % (directory, len(self.files))) self.dir = directory | 97e254ff28fa5babf53ed96d1ca47222a6135361 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/97e254ff28fa5babf53ed96d1ca47222a6135361/unix.py | |
| ['menu', 'How to greet?', 'how', ['cheerfully', 'with a smile', | 'sullenly', 'without enthusiasm', | 'spontaneously', 'on the spur of the moment']]] | | ['menu', 'How to greet?', 'how', [('cheerfully', 'with a smile'), | ('sullenly', 'without enthusiasm'), | ('spontaneously', 'on the spur of the moment')]]] | def htmlFor_checkgroup(write, name, value): "A check-group." for optionName, displayName, checked in value: checked = (checked and 'checked') or '' write('<INPUT TYPE="checkbox" NAME="%s" VALUE="%s" %s>%s<br>\n' % (name, optionName, checked, displayName)) | 103caafdd19259c68adab5b2610223331fb12b7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/103caafdd19259c68adab5b2610223331fb12b7b/widgets.py |
log.msg('touching %s' % self) | def touch(self): log.msg('touching %s' % self) f = open(self.filename, 'w') f.seek(0) if self.writePID: f.write(str(os.getpid())) else: f.write("a") f.close() # keep the lock fresh | 11d7d3a46f38198b2c640e561088aefba1a2d477 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/11d7d3a46f38198b2c640e561088aefba1a2d477/lockfile.py | |
log.msg('removing %s' % self) | def remove(self): log.msg('removing %s' % self) self.touchLoop.stop() os.remove(self.filename) | 11d7d3a46f38198b2c640e561088aefba1a2d477 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/11d7d3a46f38198b2c640e561088aefba1a2d477/lockfile.py | |
callback(string) or errback(string) | callback(string) or errback(error) | def eomReceived(self): """handle end of message | 1a2a8630ce5edc2afd851463d72dcd1c100416f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/1a2a8630ce5edc2afd851463d72dcd1c100416f0/smtp.py |
skip = "Crypto requirements missing, can't run historic recvline tests over ssh" | skip = "Crypto requirements missing, can't run manhole tests over ssh" | ">>> def deferLater(n):", | 3436997d64b4d63079c79c1661e75153a1b16b08 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/3436997d64b4d63079c79c1661e75153a1b16b08/test_manhole.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.