rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
self.sendLine("PART else: self.sendLine("PART | self.sendLine("PART %s :%s" % (channel, reason)) else: self.sendLine("PART %s" % (channel,)) | def leave(self, channel, reason=None): if reason: self.sendLine("PART #%s :%s" % (channel, reason)) else: self.sendLine("PART #%s" % (channel,)) | 77af3d0a895df51069178c748fdbe09419e4ac4c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/77af3d0a895df51069178c748fdbe09419e4ac4c/irc.py |
self.sendLine("PRIVMSG | if channel[0] not in '& self.sendLine("PRIVMSG %s :%s" % (channel, message)) | def say(self, channel, message): self.sendLine("PRIVMSG #%s :%s" % (channel, message)) | 77af3d0a895df51069178c748fdbe09419e4ac4c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/77af3d0a895df51069178c748fdbe09419e4ac4c/irc.py |
self.ctcpMakeQuery(' | if channel[0] not in '& self.ctcpMakeQuery(channel, [('ACTION', action)]) | def me(self, channel, action): """Strike a pose. """ self.ctcpMakeQuery('#' + channel, [('ACTION', action)]) | 77af3d0a895df51069178c748fdbe09419e4ac4c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/77af3d0a895df51069178c748fdbe09419e4ac4c/irc.py |
self.joined(params[-1][1:]) | nick = string.split(prefix,'!')[0] if nick == self.nickname: self.joined(params[-1]) | def irc_JOIN(self, prefix, params): self.joined(params[-1][1:]) | 77af3d0a895df51069178c748fdbe09419e4ac4c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/77af3d0a895df51069178c748fdbe09419e4ac4c/irc.py |
line = lowDequote(line) try: prefix, command, params = parsemsg(line) if numeric_to_symbolic.has_key(command): command = numeric_to_symbolic[command] method = getattr(self, "irc_%s" % command, None) if method is not None: method(prefix, params) else: self.irc_unknown(prefix, command, params) except IRCBadMessage: apply... | lines = string.split(line,'\n') for line in lines: line = lowDequote(line) try: prefix, command, params = parsemsg(line) if numeric_to_symbolic.has_key(command): command = numeric_to_symbolic[command] method = getattr(self, "irc_%s" % command, None) if method is not None: method(prefix, params) else: self.irc_unknown(... | def lineReceived(self, line): line = lowDequote(line) try: prefix, command, params = parsemsg(line) if numeric_to_symbolic.has_key(command): command = numeric_to_symbolic[command] method = getattr(self, "irc_%s" % command, None) if method is not None: method(prefix, params) else: self.irc_unknown(prefix, command, param... | 77af3d0a895df51069178c748fdbe09419e4ac4c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/77af3d0a895df51069178c748fdbe09419e4ac4c/irc.py |
self.bytesReceived = self.bytesReceived + len(data) | def dataReceived(self, data): """Called when data is received. | 77af3d0a895df51069178c748fdbe09419e4ac4c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/77af3d0a895df51069178c748fdbe09419e4ac4c/irc.py | |
return type_, luid, jstate | l.extend([type_, luid, jstate]) return jellier.preserve(self, l) | def jellyFor(self, jellier): """Return an appropriate tuple to serialize me. | dda8cd0078cdef41ab73eda39698f25330cffb19 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/dda8cd0078cdef41ab73eda39698f25330cffb19/flavors.py |
return self.processWidget(request, widget, node) | return self.processWidget(request, result, node) | def dispatchResult(self, request, node, result): """ Check a given result from handling a node and hand it to a process* method which will convert the result into a node and insert it into the DOM tree. Return the new node. """ if isinstance(result, Widget): return self.processWidget(request, widget, node) elif isinsta... | aa466abea5fc6dd7ae3d4fafa084db5d01fcacf5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/aa466abea5fc6dd7ae3d4fafa084db5d01fcacf5/domtemplate.py |
return self.processString(request, string, node) | return self.processString(request, result, node) | def dispatchResult(self, request, node, result): """ Check a given result from handling a node and hand it to a process* method which will convert the result into a node and insert it into the DOM tree. Return the new node. """ if isinstance(result, Widget): return self.processWidget(request, widget, node) elif isinsta... | aa466abea5fc6dd7ae3d4fafa084db5d01fcacf5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/aa466abea5fc6dd7ae3d4fafa084db5d01fcacf5/domtemplate.py |
child = parseString(html) | child = minidom.parseString(html) | def processString(self, request, html, node): try: child = parseString(html) except Exception, e: print "damn, error parsing, probably invalid xml", e child = self.d.createTextNode(html) return self.processNode(request, child, node) | aa466abea5fc6dd7ae3d4fafa084db5d01fcacf5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/aa466abea5fc6dd7ae3d4fafa084db5d01fcacf5/domtemplate.py |
print "damn, error parsing, probably invalid xml", e | print "damn, error parsing, probably invalid xml:", e | def processString(self, request, html, node): try: child = parseString(html) except Exception, e: print "damn, error parsing, probably invalid xml", e child = self.d.createTextNode(html) return self.processNode(request, child, node) | aa466abea5fc6dd7ae3d4fafa084db5d01fcacf5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/aa466abea5fc6dd7ae3d4fafa084db5d01fcacf5/domtemplate.py |
L.append(getBodyStructure(submsg)) | result.append(getBodyStructure(submsg)) | def getBodyStructure(msg, extended=False): # XXX - This does not properly handle multipart messages # BODYSTRUCTURE is obscenely complex and criminally under-documented. attrs = {} headers = 'content-type', 'content-id', 'content-description', 'content-transfer-encoding' headers = msg.getHeaders(False, *headers) mm = ... | 4cd8cbb2218f9a88cac0655e126bccf59fda478c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4cd8cbb2218f9a88cac0655e126bccf59fda478c/imap4.py |
self._deferredWasDebugging = defer.Deferred.debug | self._deferredWasDebugging = defer.getDebugging() | def setUp(self): self._deferredWasDebugging = defer.Deferred.debug defer.setDebugging(True) | c194b96864bf19ecdcac86466ff865bc1694ac27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/c194b96864bf19ecdcac86466ff865bc1694ac27/test_defer.py |
if not isinstance(serviceName, types.StringType): | if not isinstance(serviceName, types.StringTypes): | def __init__(self, serviceName, serviceParent=None, application=None): """Create me, attached to the given application. | f947177fe1663c9b7e8b179a7023d3f519320a5d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f947177fe1663c9b7e8b179a7023d3f519320a5d/app.py |
if isinstance(port, StringTypes): | if isinstance(port, types.StringTypes): | def upgradeToVersion11(self): self._extraListeners = {} self.extraPorts = [] self.extraConnectors = [] self.unixPorts = [] self.udpConnectors = [] | f947177fe1663c9b7e8b179a7023d3f519320a5d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f947177fe1663c9b7e8b179a7023d3f519320a5d/app.py |
self.proxy.datagramReceived(r.toString()m ("client.com", 5060)) | self.proxy.datagramReceived(r.toString(), ("client.com", 5060)) | def unregister(self): r = sip.Request("REGISTER", "sip:bell.example.com") r.addHeader("to", "sip:joe@bell.example.com") r.addHeader("contact", "*") r.addHeader("via", sip.Via("client.com").toString()) r.addHeader("expires", "0") self.proxy.datagramReceived(r.toString()m ("client.com", 5060)) | 21d90ca605586e14f28406f74ff4d9475a57682a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/21d90ca605586e14f28406f74ff4d9475a57682a/test_sip.py |
def loadMimeTypes(): """Ugg, does this even need to exist anymore? Stupid stdlib""" | def loadMimeTypes(mimetype_locations=['/etc/mime.types']): ''' Multiple file locations containing mime-types can be passed as a list. The files will be sourced in that order, overriding mime-types from the files sourced beforehand, but only if a new entry explicitly overrides the current entry. ''' | def loadMimeTypes(): """Ugg, does this even need to exist anymore? Stupid stdlib""" import mimetypes # let's try a few of the usual suspects... contentTypes = { ".css": "text/css", ".exe": "application/x-executable", ".flac": "audio/x-flac", ".gif": "image/gif", ".gtar": "application/x-gtar", ".html": "text/html", ".h... | 75d8b502aface2979d180f117749b99f3798fe5b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/75d8b502aface2979d180f117749b99f3798fe5b/static.py |
contentTypes = { ".css": "text/css", ".exe": "application/x-executable", ".flac": "audio/x-flac", ".gif": "image/gif", ".gtar": "application/x-gtar", ".html": "text/html", ".htm": "text/html", ".java": "text/plain", ".jpeg": "image/jpeg", ".jpg": "image/jpeg", ".lisp": "text/x-lisp", ".mp3": "audio/mpeg", ".oz": "tex... | contentTypes = mimetypes.types_map contentTypes.update( { '.conf': 'text/plain', '.diff': 'text/plain', '.exe': 'application/x-executable', '.flac': 'audio/x-flac', '.java': 'text/plain', '.ogg': 'application/ogg', '.oz': 'text/x-oz', '.swf': 'application/x-shockwave-flash', '.tgz': 'application/x-gta... | def loadMimeTypes(): """Ugg, does this even need to exist anymore? Stupid stdlib""" import mimetypes # let's try a few of the usual suspects... contentTypes = { ".css": "text/css", ".exe": "application/x-executable", ".flac": "audio/x-flac", ".gif": "image/gif", ".gtar": "application/x-gtar", ".html": "text/html", ".h... | 75d8b502aface2979d180f117749b99f3798fe5b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/75d8b502aface2979d180f117749b99f3798fe5b/static.py |
upd = contentTypes.update if os.path.exists("/etc/mime.types"): upd(mimetypes.read_mime_types("/etc/mime.types")) | ) for location in mimetype_locations: if os.path.exists(location): contentTypes.update(mimetypes.read_mime_types(location)) | def loadMimeTypes(): """Ugg, does this even need to exist anymore? Stupid stdlib""" import mimetypes # let's try a few of the usual suspects... contentTypes = { ".css": "text/css", ".exe": "application/x-executable", ".flac": "audio/x-flac", ".gif": "image/gif", ".gtar": "application/x-gtar", ".html": "text/html", ".h... | 75d8b502aface2979d180f117749b99f3798fe5b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/75d8b502aface2979d180f117749b99f3798fe5b/static.py |
return tcp.Port(address, factory, backlog=backlog) | p = tcp.Port(address, factory, backlog=backlog) p.startListening() return p | def listenUNIX(self, address, factory, backlog=5): """Listen on a UNIX socket. """ return tcp.Port(address, factory, backlog=backlog) | 814365002682b3a469c0019543cf374c3deb743d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/814365002682b3a469c0019543cf374c3deb743d/default.py |
self.sendReply(protocol, message, protocol, address) | self.sendReply(protocol, message, address) | def recursiveLookupFailed(self, failure, message, protocol, address): message.rCode = dns.ESERVER self.sendReply(protocol, message, protocol, address) if self.verbose: log.msg("Recursive lookup failed") | 1f97260d0d06fc0eba00bb6002d5778b7d491bc0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/1f97260d0d06fc0eba00bb6002d5778b7d491bc0/server.py |
def say(self,event): | def say(self,event=None): | def say(self,event): message=self.input.get('1.0',END)[:-1] self.input.delete('1.0',END) if message: self.messageReceived(message,self.gateway.username) self.im.directMessage(self.gateway,self.contact,message) return "break" # don't put the newline in | 9078cecc707fdea05de3fce15190ee235bb404f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9078cecc707fdea05de3fce15190ee235bb404f5/tkim.py |
log.err("Read-only property %s: %s" % (property.sname(),)) | log.err("Read-only property %s" % (property.sname(),)) | def writeProperty(self, property): """ See L{IDAVResource.writeProperty}. """ try: self.getProperties()[property.qname()] = property except ValueError: log.err("Read-only property %s: %s" % (property.sname(),)) raise HTTPError(responsecode.CONFLICT) | f8bd9d31a352ca1ed7b7d0ca4e56449094872913 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f8bd9d31a352ca1ed7b7d0ca4e56449094872913/resource.py |
security according to the given contextFactory, or which fails | secured according to the given contextFactory, or which fails | def startTLS(self, contextFactory=None): """ Initiates a 'STARTTLS' request and negotiates the TLS / SSL Handshake. | 66f0d92e0ba2edffa7906b1cbecccda7f1f988a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/66f0d92e0ba2edffa7906b1cbecccda7f1f988a7/imap4.py |
if not components.implements(m, interfaces.IModel): | if not interfaces.IModel.providedBy(m): | def __init__(self, m, templateFile=None, templateDirectory=None, template=None, controller=None, doneCallback=None, modelStack=None, viewStack=None, controllerStack=None): """ A view must be told what its model is, and may be told what its controller is, but can also look up its controller if none specified. """ if not... | eb3985230554a8207ec466b50bcfa35fdd259c5a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/eb3985230554a8207ec466b50bcfa35fdd259c5a/view.py |
already be disabled. | already be enabled. | def will(self, option): """Indicate our willingness to begin performing this option locally. | 1d9d1240e2dcb158a032267fd8babcb238d23ffb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/1d9d1240e2dcb158a032267fd8babcb238d23ffb/telnet.py |
class CUDPPort(cudp.UDPPortMixin, udp.Port): | _origUDPPort = udp.Port class CUDPPort(cudp.UDPPortMixin, _origUDPPort): | def _makeTransport(self): return CClient(self.host, self.port, self.bindAddress, self, self.reactor) | ad36ec9fe865b94885d719f41b3e660ccfb39fee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/ad36ec9fe865b94885d719f41b3e660ccfb39fee/hooks.py |
udp.Port.__init__(self, *args, **kwargs) | _origUDPPort.__init__(self, *args, **kwargs) | def __init__(self, *args, **kwargs): udp.Port.__init__(self, *args, **kwargs) cudp.UDPPortMixin.__init__(self, self) | ad36ec9fe865b94885d719f41b3e660ccfb39fee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/ad36ec9fe865b94885d719f41b3e660ccfb39fee/hooks.py |
return clazz.__module__+'.'+clazz.__name__ | return str(clazz) | def qual(clazz): return clazz.__module__+'.'+clazz.__name__ | 91170b0a8c5bd431eb7a37f747f19bd940336099 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/91170b0a8c5bd431eb7a37f747f19bd940336099/reflect.py |
names = L.split() | names = parseNestedParens(L) | def finish(self, lastLine, unusedCallback): send = [] unuse = [] for L in self.lines: names = L.split() N = len(names) if (N >= 1 and names[0] in self._1_RESPONSES or N >= 2 and names[1] in self._2_RESPONSES): send.append(L) else: print 'Appending unused', L unuse.append(L) self.defer.callback((send, lastLine)) if unus... | 4027a6cf25572196e26d4777f91b068d9c912743 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4027a6cf25572196e26d4777f91b068d9c912743/imap4.py |
N >= 2 and names[1] in self._2_RESPONSES): | N >= 2 and names[1] in self._2_RESPONSES or N >= 2 and names[0] == 'OK' and isinstance(names[1], types.ListType) and names[1][0] in self._OK_RESPONSES): | def finish(self, lastLine, unusedCallback): send = [] unuse = [] for L in self.lines: names = L.split() N = len(names) if (N >= 1 and names[0] in self._1_RESPONSES or N >= 2 and names[1] in self._2_RESPONSES): send.append(L) else: print 'Appending unused', L unuse.append(L) self.defer.callback((send, lastLine)) if unus... | 4027a6cf25572196e26d4777f91b068d9c912743 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4027a6cf25572196e26d4777f91b068d9c912743/imap4.py |
print 'Appending unused', L | def finish(self, lastLine, unusedCallback): send = [] unuse = [] for L in self.lines: names = L.split() N = len(names) if (N >= 1 and names[0] in self._1_RESPONSES or N >= 2 and names[1] in self._2_RESPONSES): send.append(L) else: print 'Appending unused', L unuse.append(L) self.defer.callback((send, lastLine)) if unus... | 4027a6cf25572196e26d4777f91b068d9c912743 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4027a6cf25572196e26d4777f91b068d9c912743/imap4.py | |
cmd.finish(line, self._extraInfo) | cmd.finish(rest, self._extraInfo) | def _defaultHandler(self, tag, rest): if tag == '*' or tag == '+': if not self.waiting: # XXX - This is rude. self.transport.loseConnection() raise IllegalServerResponse(tag + ' ' + rest) else: cmd = self.tags[self.waiting] if tag == '+': cmd.continuation.callback(rest) else: cmd.lines.append(rest) else: try: cmd = sel... | 4027a6cf25572196e26d4777f91b068d9c912743 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4027a6cf25572196e26d4777f91b068d9c912743/imap4.py |
d.addCallback(self._cbSelect) | d.addCallback(self._cbSelect, 1) | def select(self, mailbox): """Select a mailbox | 4027a6cf25572196e26d4777f91b068d9c912743 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4027a6cf25572196e26d4777f91b068d9c912743/imap4.py |
resp = 'FLAGS', 'EXISTS', 'RECENT', 'UNSEEN', 'PERMANENTFLAGS' | resp = ('FLAGS', 'EXISTS', 'RECENT', 'UNSEEN', 'PERMANENTFLAGS', 'UIDVALIDITY') | def examine(self, mailbox): """Select a mailbox in read-only mode | 4027a6cf25572196e26d4777f91b068d9c912743 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4027a6cf25572196e26d4777f91b068d9c912743/imap4.py |
d.addCallback(self._cbSelect) return d def _cbSelect(self, (lines, tagline)): | d.addCallback(self._cbSelect, 0) return d def _cbSelect(self, (lines, tagline), rw): | def examine(self, mailbox): """Select a mailbox in read-only mode | 4027a6cf25572196e26d4777f91b068d9c912743 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4027a6cf25572196e26d4777f91b068d9c912743/imap4.py |
datum = {'READ-WRITE': 1} | datum = {'READ-WRITE': rw} | def _cbSelect(self, (lines, tagline)): # In the absense of specification, we are free to assume: # READ-WRITE access datum = {'READ-WRITE': 1} lines.append(tagline) for parts in lines: split = parts.split() if len(split) == 2: if split[1].upper().strip() == 'EXISTS': try: datum['EXISTS'] = int(split[0]) except ValueE... | 4027a6cf25572196e26d4777f91b068d9c912743 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4027a6cf25572196e26d4777f91b068d9c912743/imap4.py |
if self.site.sessions.has_key(self.uid): | if self.guard.sessions.has_key(self.uid): | def checkExpired(self): # If I haven't been touched in 15 minutes: if time.time() - self.lastModified > self.lifetime / 2: if self.site.sessions.has_key(self.uid): self.expire() else: log.msg("no session to expire: %s" % self.uid) else: log.msg("session given the will to live for %s more seconds" % self.lifetime) self.... | 57e18614747581659a1de7e3e7c60403bdb4c97e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/57e18614747581659a1de7e3e7c60403bdb4c97e/guard.py |
def __init__(self, rsrc): | def __init__(self, rsrc, cookieKey=None): | def __init__(self, rsrc): Resource.__init__(self) self.resource = rsrc self.cookieKey = "woven_session_" + _sessionCookie() self.sessions = {} | 57e18614747581659a1de7e3e7c60403bdb4c97e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/57e18614747581659a1de7e3e7c60403bdb4c97e/guard.py |
self.cookieKey = "woven_session_" + _sessionCookie() | if cookieKey is None: cookieKey = "woven_session_" + _sessionCookie() self.cookieKey = cookieKey | def __init__(self, rsrc): Resource.__init__(self) self.resource = rsrc self.cookieKey = "woven_session_" + _sessionCookie() self.sessions = {} | 57e18614747581659a1de7e3e7c60403bdb4c97e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/57e18614747581659a1de7e3e7c60403bdb4c97e/guard.py |
elif why is not None: | elif self.watcher: | def write(self, sock): why = None w = self.watcher self.setEnabled(0) try: why = w.doWrite() except: why = sys.exc_value log.msg('Error in %s.doWrite()' % w) log.deferr() if why: try: w.connectionLost(failure.Failure(why)) except: log.deferr() self.reactor.removeReader(w) self.reactor.removeWriter(w) elif why is not No... | 35b6f87169ccef6acbcd5f539d342f536b410465 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/35b6f87169ccef6acbcd5f539d342f536b410465/qtreactor.py |
return files_created | return files_created | def install(): """@return a list of files/directories created""" files_created=[] if platform.type != "win32": pass else: print "Installing environment script...", scripts_dir=os.path.join(sysconfig.get_config_var("prefix"), "scripts") # FIXME - this list needs some work twisted_scripts=" ".join(["twistd", "mktap", "im... | 32357460cb221e2fe6afdb0bade31f8b15361047 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/32357460cb221e2fe6afdb0bade31f8b15361047/postinstall.py |
self.transport.write(line+"\r\n") | self.transport.write("%s%s%s" % (line, CR, LF)) | def sendLine(self, line): self.transport.write(line+"\r\n") | e104e20b17c55650869c262fd998da916864a21c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e104e20b17c55650869c262fd998da916864a21c/irc.py |
classDccPbRequest = None | nickname = None | def dataReceived(self, data): """This hack is to support mIRC, which sends LF only, even though the RFC says CRLF. (Also, the flexibility of LineReceiver to turn "line mode" on and off was not required.) """ self.buffer = self.buffer + data lines = string.split(self.buffer, LF) # Put the (possibly empty) element after... | e104e20b17c55650869c262fd998da916864a21c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e104e20b17c55650869c262fd998da916864a21c/irc.py |
def ctcpQuery_ACTION(self, channel, user, data): | def ctcpQuery_ACTION(self, user, channel, data): | def ctcpQuery_ACTION(self, channel, user, data): self.action(user, channel, data) | e104e20b17c55650869c262fd998da916864a21c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e104e20b17c55650869c262fd998da916864a21c/irc.py |
def ctcpQuery_PING(self, channel, user, data): | def ctcpQuery_PING(self, user, channel, data): | def ctcpQuery_PING(self, channel, user, data): nick = string.split(user,"!")[0] self.ctcpMakeReply(nick, [("PING", data)]) | e104e20b17c55650869c262fd998da916864a21c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e104e20b17c55650869c262fd998da916864a21c/irc.py |
string.join(self.sourceFiles, ' ') | sourceFiles, | def ctcpQuery_SOURCE(self, user, channel, data): if data is not None: self.quirkyMessage("Why did %s send '%s' with a SOURCE query?" % (user, data)) if self.sourceHost: nick = string.split(user,"!")[0] self.ctcpMakeReply(nick, [('SOURCE', "%s:%s:%s" % (self.sourceHost, self.sourceDir, string.join(self.sourceFiles, ' ')... | e104e20b17c55650869c262fd998da916864a21c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e104e20b17c55650869c262fd998da916864a21c/irc.py |
(dcctype, arg, address, port) = data | (dcctype, arg, address, port) = data[:4] port = int(port) if '.' in address: pass else: try: address = long(address) except ValueError: raise IRCBadMessage,\ "Indecipherable address '%s'" % (address,) else: address = ( (address >> 24) & 0xFF, (address >> 16) & 0xFF, (address >> 8) & 0xFF, address & 0xFF, ) address =... | def ctcpQuery_DCC(self, user, channel, data): data = string.split(data) if len(data) < 4: raise IRCBadMessage, "malformed DCC request: %s" % (data,) | e104e20b17c55650869c262fd998da916864a21c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e104e20b17c55650869c262fd998da916864a21c/irc.py |
size = data[4] else: size = -1 filename = arg raise NotImplementedError, "XXX: DCC SEND not implemented." | try: size = int(data[4]) except ValueError: pass filename = path.basename(arg) protocol = DccFileReceive(filename, size, queryData=(user,channel,data)) tcp.Client(address, port, protocol) self.dcc_sessions.append(protocol) | def ctcpQuery_DCC(self, user, channel, data): data = string.split(data) if len(data) < 4: raise IRCBadMessage, "malformed DCC request: %s" % (data,) | e104e20b17c55650869c262fd998da916864a21c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e104e20b17c55650869c262fd998da916864a21c/irc.py |
raise NotImplementedError, "XXX: DCC CHAT not implemented." elif dcctype == 'PB': b = self.classDccPbRequest(user, channel, arg) pb.getObjectAt(address, port, b.callback, b.errback) | protocol = DccChat(self, queryData=(user, channel, data)) tcp.Client(address, port, protocol) self.dcc_sessions.append(protocol) | def ctcpQuery_DCC(self, user, channel, data): data = string.split(data) if len(data) < 4: raise IRCBadMessage, "malformed DCC request: %s" % (data,) | e104e20b17c55650869c262fd998da916864a21c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e104e20b17c55650869c262fd998da916864a21c/irc.py |
if not self._pings.has_key(data): | if (not self._pings) or (not self._pings.has_key(data)): | def ctcpReply_PING(self, user, channel, data): if not self._pings.has_key(data): raise IRCBadMessage,\ "Bogus PING response from %s: %s" % (user, data) | e104e20b17c55650869c262fd998da916864a21c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e104e20b17c55650869c262fd998da916864a21c/irc.py |
self.log(traceback.format_exception(excType, excValue, tb)) | self.log(string.join(traceback.format_exception(excType, excValue, tb),'')) | def badMessage(self, line, excType, excValue, tb): """When I get a message that's so broken I can't use it. """ self.log(line) self.log(traceback.format_exception(excType, excValue, tb)) | e104e20b17c55650869c262fd998da916864a21c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e104e20b17c55650869c262fd998da916864a21c/irc.py |
NUL = chr(0) CR = chr(015) NL = chr(012) LF = NL | def sendLine(self, line): basic.LineReceiver.sendLine(self, lowQuote(line)) | e104e20b17c55650869c262fd998da916864a21c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e104e20b17c55650869c262fd998da916864a21c/irc.py | |
SPC = chr(040) | def sendLine(self, line): basic.LineReceiver.sendLine(self, lowQuote(line)) | e104e20b17c55650869c262fd998da916864a21c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e104e20b17c55650869c262fd998da916864a21c/irc.py | |
util.spinUntil(lambda :p.disconnected) | spinUntil(lambda :p.disconnected) | def cleanPorts(self, *ports): for p in ports: if not hasattr(p, 'disconnected'): raise RuntimeError, ("You handed something to cleanPorts that" " doesn't have a disconnected attribute, dummy!") if not p.disconnected: d = getattr(p, self.callToLoseCnx)() if isinstance(d, defer.Deferred): wait(d) else: try: util.spinUnti... | 9a3d0d2921ec234c9c9e21996761793126512933 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9a3d0d2921ec234c9c9e21996761793126512933/test_unix.py |
packageDir = os.path.dirname(package.__file__) | def loadPackageRecursive(self, package): packageDir = os.path.dirname(package.__file__) suite = self.suiteFactory() os.path.walk(packageDir, self._packageRecurse, suite) return suite | 4f2abefec014ce51b87f0fa3e8ca3cce6a6c6b04 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4f2abefec014ce51b87f0fa3e8ca3cce6a6c6b04/runner.py | |
os.path.walk(packageDir, self._packageRecurse, suite) | for packageDir in package.__path__: os.path.walk(packageDir, self._packageRecurse, suite) | def loadPackageRecursive(self, package): packageDir = os.path.dirname(package.__file__) suite = self.suiteFactory() os.path.walk(packageDir, self._packageRecurse, suite) return suite | 4f2abefec014ce51b87f0fa3e8ca3cce6a6c6b04 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4f2abefec014ce51b87f0fa3e8ca3cce6a6c6b04/runner.py |
reactor.connectTCP(host, port, factory) return d.addCallback(lambda x: (x, [], [])) | connector = reactor.connectTCP(host, port, factory) return d.addCallback(self._cbLookupZone, connector) def _cbLookupZone(self, result, connector): connector.disconnect() return (result, [], []) | def lookupZone(self, name, timeout = 10): """ Perform an AXFR request. This is quite different from usual DNS requests. See http://cr.yp.to/djbdns/axfr-notes.html for more information. """ address = self.pickServer() if address is None: return defer.fail(IOError('No domain name servers available')) host,port = address ... | b002f3376032fcb7bcc352d65f1cd18aaef6d1cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b002f3376032fcb7bcc352d65f1cd18aaef6d1cc/client.py |
def sendMessage(self, text, meta={}): if meta.get("style", None) == "emote": text="* "+text+"* " | def sendMessage(self, text, meta=None): if meta: if meta.get("style", None) == "emote": text="* "+text+"* " | def sendMessage(self, text, meta={}): if meta.get("style", None) == "emote": text="* "+text+"* " self.account.say(self.name,html(text)) return succeed(text) | 9a642934f5be7216298054366f496ef02d9cdaf5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9a642934f5be7216298054366f496ef02d9cdaf5/tocsupport.py |
def sendGroupMessage(self, text, meta={}): if meta.get("style", None) == "emote": text="* "+text+"* " | def sendGroupMessage(self, text, meta=None): if meta: if meta.get("style", None) == "emote": text="* "+text+"* " | def sendGroupMessage(self, text, meta={}): if meta.get("style", None) == "emote": text="* "+text+"* " self.account.chat_say(self.roomID,html(text)) return succeed(text) | 9a642934f5be7216298054366f496ef02d9cdaf5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9a642934f5be7216298054366f496ef02d9cdaf5/tocsupport.py |
from twisted.im.account import registerAccount | from twisted.im.account import registerAccount | def create(self, accountName, autoLogin): return TOCAccount( accountName, autoLogin, self.xml.get_widget("TOCName").get_text(), self.xml.get_widget("TOCPass").get_text(), self.xml.get_widget("TOCHost").get_text(), int(self.xml.get_widget("TOCPort").get_text()) ) | 9a642934f5be7216298054366f496ef02d9cdaf5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9a642934f5be7216298054366f496ef02d9cdaf5/tocsupport.py |
if self.addSlash and request.prepath[-1] != '' and request.prepath[-1] != 'index.rpy': | if self.addSlash and request.uri[-1] != '/': | 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... | bc8d948dd02cb3030fb902d320f4bb8a81c880c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bc8d948dd02cb3030fb902d320f4bb8a81c880c3/controller.py |
f.HTTPChannel = Proxy | f.protocol = Proxy | def process(self): parsed = urlparse.urlparse(self.uri) protocol = parsed[0] host = parsed[1] port = self.ports[protocol] if ':' in host: host, port = string.split(host, ':') rest = urlparse.urlunparse(('','')+parsed[2:]) if not rest: rest = rest+'/' class_ = self.protocols[protocol] headers = self.getAllHeaders().copy... | a3768723ec45cd3cf390f65e2c29271da4fb15ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a3768723ec45cd3cf390f65e2c29271da4fb15ca/proxy.py |
synopsis = "Usage: tapconvert in-file [options]" optParameters = [['in', 'i', None, "The filename of the tap to read from"], ['out', 'o', None, "A filename to write the tap to"], ['typein', 'f', 'pickle', "The format to use; this can be 'python', 'pickle', 'xml', or 'source'."], ['typeout', 't', 'source', "The output ... | synopsis = "Usage: tapconvert [options]" optParameters = [ ['in', 'i', None, "The filename of the tap to read from"], ['out', 'o', None, "A filename to write the tap to"], ['typein', 'f', 'guess', "The format to use; this can be 'guess', 'python', 'pickle', 'xml', or 'source'."], ['typeout', 't', 's... | def savePersisted(app, filename, encrypted): if encrypted: try: import Crypto app.save(filename=filename, passphrase=util.getPassword("Encryption passphrase: ")) except ImportError: print "The --encrypt flag requires the PyCrypto module, no file written." else: app.save(filename=filename) | 488bc6a0fc352e04e5281b04e4c09d66b7e71b3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/488bc6a0fc352e04e5281b04e4c09d66b7e71b3d/tapconvert.py |
ts = self.path.sibling('sibling_test') self.assertEquals(ts.dirname(), self.path.dirname()) | p = self.path.child('sibling_start') ts = p.sibling('sibling_test') self.assertEquals(ts.dirname(), p.dirname()) | def testSibling(self): ts = self.path.sibling('sibling_test') self.assertEquals(ts.dirname(), self.path.dirname()) self.assertEquals(ts.basename(), 'sibling_test') ts.createDirectory() self.assertIn(ts, self.path.parent().children()) | e66c2ad7c5da3466f784cd5f113519b2f18c2621 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e66c2ad7c5da3466f784cd5f113519b2f18c2621/test_paths.py |
self.assertIn(ts, self.path.parent().children()) | self.assertIn(ts, self.path.children()) | def testSibling(self): ts = self.path.sibling('sibling_test') self.assertEquals(ts.dirname(), self.path.dirname()) self.assertEquals(ts.basename(), 'sibling_test') ts.createDirectory() self.assertIn(ts, self.path.parent().children()) | e66c2ad7c5da3466f784cd5f113519b2f18c2621 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e66c2ad7c5da3466f784cd5f113519b2f18c2621/test_paths.py |
@param contextFactory: a L{twisted.internet.ssl.ContextFactory} object. | @param contextFactory: a L{twisted.internet.ssl.ClientContextFactory} object. | def connectSSL(self, host, port, factory, contextFactory, timeout=30, bindAddress=None): """Connect a client Protocol to a remote SSL socket. | 991c1227c269d1d5a7a8067391cf765653066fe4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/991c1227c269d1d5a7a8067391cf765653066fe4/interfaces.py |
self.assertApproximates(self._resetcallbackTime, start + 0.5, 0.1) self.assertApproximates(self._delaycallbackTime, start + 0.8, 0.1) | self.assert_(self._resetcallbackTime>start + 0.5) self.assert_(self._delaycallbackTime>start + 0.8) self.assert_(self._delaycallbackTime>self._resetcallbackTime) | def testCallLaterDelayAndReset(self): self._resetcallbackTime = None self._delaycallbackTime = None ireset = reactor.callLater(0.5, self._resetcallback) idelay = reactor.callLater(0.5, self._delaycallback) start = time.time() # chug a little before delaying while time.time() - start < 0.2: reactor.iterate(0.01) ireset.... | accd2bea7416a9e6d471beaba196809b3d6e66b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/accd2bea7416a9e6d471beaba196809b3d6e66b0/test_internet.py |
p = process.Process(*([None] * 7)) | p = reactor.spawnProcess(protocol.ProcessProtocol(), "/bin/ls") | def testAliasResolution(self): aliases = {} domain = {'': TestDomain(aliases, ['user1', 'user2', 'user3'])} A1 = mail.alias.AliasGroup(['user1', '|process', '/file'], domain, 'alias1') A2 = mail.alias.AliasGroup(['user2', 'user3'], domain, 'alias2') A3 = mail.alias.AddressAlias('alias1', domain, 'alias3') aliases.updat... | f6ba434241b3eac97766197a2a435a66eefb340c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f6ba434241b3eac97766197a2a435a66eefb340c/test_mail.py |
p = process.Process(*([None] * 7)) | p = reactor.spawnProcess(protocol.ProcessProtocol(), "/bin/ls") | def testCyclicAlias(self): aliases = {} domain = {'': TestDomain(aliases, [])} A1 = mail.alias.AddressAlias('alias2', domain, 'alias1') A2 = mail.alias.AddressAlias('alias3', domain, 'alias2') A3 = mail.alias.AddressAlias('alias1', domain, 'alias3') aliases.update({ 'alias1': A1, 'alias2': A2, 'alias3': A3 }) | f6ba434241b3eac97766197a2a435a66eefb340c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f6ba434241b3eac97766197a2a435a66eefb340c/test_mail.py |
reactor.stop() | def connectionLost(self, reason): print 'connection lost (protocol)' reactor.stop() | 17dc9b383880d2ab66edf33f087eae3875171412 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/17dc9b383880d2ab66edf33f087eae3875171412/echoclient_ssl.py | |
if self.producer is not None: | if self.producer is not None and not self.finished: | def noLongerQueued(self): """Notify the object that it is no longer queued. | 4b8da13775d6c968d7d69545eefe86a8f78d7cdc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4b8da13775d6c968d7d69545eefe86a8f78d7cdc/http.py |
self.setNick("twistedbot") | def connectionMade(self): self.file = open(self.factory.filename, "a") self.log("[connected at %s]" % time.asctime(time.localtime(time.time()))) self.setNick("twistedbot") self.join(self.factory.channel) | 5802309be8118f33bb7e503e1fa01fad616dd061 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5802309be8118f33bb7e503e1fa01fad616dd061/ircLogBot.py | |
"Take on down and pass it around,\n" + | "Take one down and pass it around,\n" + | def connectionMade(self): print "connectionMade!" for i in range(self.verses): self.transport.write("Aleph-null bottles of beer on the wall,\n" + "Aleph-null bottles of beer,\n" + "Take on down and pass it around,\n" + "Aleph-null bottles of beer on the wall.\n") self.transport.closeStdin() # tell them we're done | 35c3a844d6127bd631a6cbedea8cc83b0c2afe1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/35c3a844d6127bd631a6cbedea8cc83b0c2afe1d/process.py |
log.msg("listening on (%s, %s)" % (host, port)) | if __debug__: print "listening on (%s, %s)" % (host, port) | def __init__(self, (host, port), factory, backlog, **kw): log.msg("listening on (%s, %s)" % (host, port)) if isinstance(port, types.StringTypes): try: port = socket.getservbyname(port, 'tcp') except socket.error, e: raise ServiceNameUnknownError(string=str(e)) server.SocketPort.__init__(self, (host, port), factory, bac... | e4e91c7fc6fccad6f3ce7fa7c72f4480af6b34a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e4e91c7fc6fccad6f3ce7fa7c72f4480af6b34a6/tcp.py |
self.opts['root'] = static.File(path) | self.opts['root'] = static.File(os.path.abspath(path)) | def opt_static(self, path): """<path> is either a specific file or a directory to be set as the root of the web server. Use this if you have a directory full of HTML, cgi, or php3 files or any other files that you want to be served up raw. """ | fbb5a33e6414a3839c1c5659f6f83bcc3c46d62a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/fbb5a33e6414a3839c1c5659f6f83bcc3c46d62a/web.py |
if not options['noshell']: conn.openChannel(SSHSession()) | def onConnect(): if not options['noshell']: conn.openChannel(SSHSession()) if options.localForwards: for localPort, hostport in options.localForwards: reactor.listenTCP(localPort, forwarding.SSHListenForwardingFactory(conn, hostport, SSHListenClientForwardingChannel)) if options.remoteForwards: for remotePort, hostport... | 6d10400ab77bc237c28603e1bf6c6441925d9f47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6d10400ab77bc237c28603e1bf6c6441925d9f47/conch.py | |
data = forwarding.packGlobal_tcpip_forward( ('0.0.0.0', remotePort)) d = conn.sendGlobalRequest('tcpip-forward', data) conn.remoteForwards[remotePort] = hostport | conn.requestRemoteForwarding(remotePort, hostport) if not options['noshell']: conn.openChannel(SSHSession()) | def onConnect(): if not options['noshell']: conn.openChannel(SSHSession()) if options.localForwards: for localPort, hostport in options.localForwards: reactor.listenTCP(localPort, forwarding.SSHListenForwardingFactory(conn, hostport, SSHListenClientForwardingChannel)) if options.remoteForwards: for remotePort, hostport... | 6d10400ab77bc237c28603e1bf6c6441925d9f47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6d10400ab77bc237c28603e1bf6c6441925d9f47/conch.py |
reactor.stop() | stopConnection() | def closed(self): self.unix.sendMessage('closed', self.id) if len(conn.channels) == 1 and not (options['noshell'] and not options['nocache']): # just us left reactor.stop() | 6d10400ab77bc237c28603e1bf6c6441925d9f47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6d10400ab77bc237c28603e1bf6c6441925d9f47/conch.py |
reactor.stop() | stopConnection() | def stopFactory(self): reactor.stop() | 6d10400ab77bc237c28603e1bf6c6441925d9f47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6d10400ab77bc237c28603e1bf6c6441925d9f47/conch.py |
return OPEN_CONNECT_FAILED, "don't know about that port" | return connection.OPEN_CONNECT_FAILED, "don't know about that port" | def channel_forwarded_tcpip(self, windowSize, maxPacket, data): remoteHP, origHP = forwarding.unpackOpen_forwarded_tcpip(data) if self.remoteForwards.has_key(remoteHP[1]): connectHP = self.remoteForwards[remoteHP[1]] return SSHConnectForwardingChannel(connectHP, remoteWindow = windowSize, remoteMaxPacket = maxPacket, c... | 6d10400ab77bc237c28603e1bf6c6441925d9f47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6d10400ab77bc237c28603e1bf6c6441925d9f47/conch.py |
reactor.stop() | stopConnection() | def handleInput(self, char): #log.msg('handling %s' % repr(char)) if char in ('\n', '\r'): self.escapeMode = 1 self.write(char) elif self.escapeMode == 1 and char == options['escape']: self.escapeMode = 2 elif self.escapeMode == 2: self.escapeMode = 1 # so we can chain escapes together if char == '.': # disconnect log.... | 6d10400ab77bc237c28603e1bf6c6441925d9f47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6d10400ab77bc237c28603e1bf6c6441925d9f47/conch.py |
reactor.stop() | stopConnection() | def closed(self): log.msg('closed %s' % self) if len(self.conn.channels) == 1 and not (options['noshell'] and not options['nocache']): # just us left reactor.stop() | 6d10400ab77bc237c28603e1bf6c6441925d9f47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6d10400ab77bc237c28603e1bf6c6441925d9f47/conch.py |
reactor.stop() | stopConnection() | def closed(self): forwarding.SSHListenClientForwardingChannel.closed(self) if len(self.conn.channels) == 1 and not (options['noshell'] and not options['nocache']): # just us left reactor.stop() | 6d10400ab77bc237c28603e1bf6c6441925d9f47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6d10400ab77bc237c28603e1bf6c6441925d9f47/conch.py |
reactor.stop() | stopConnection() | def closed(self): forwarding.SSHConnectForwardingChannel.closed(self) if len(self.conn.channels) == 1 and not (options['noshell'] and not options['nocache']): # just us left reactor.stop() | 6d10400ab77bc237c28603e1bf6c6441925d9f47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6d10400ab77bc237c28603e1bf6c6441925d9f47/conch.py |
env['wsgi.multiprocess'] = True | env['wsgi.multiprocess'] = False | def setupEnvironment(self, request): # Called in IO thread env = createCGIEnvironment(request) env['wsgi.version'] = (1, 0) env['wsgi.url_scheme'] = env['REQUEST_SCHEME'] env['wsgi.input'] = InputStream(request.stream) env['wsgi.errors'] = ErrorStream() env['wsgi.multithread'] = True env['wsgi.mult... | e4378c19a82322ae0026bf5eafe1584502d4dbe5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e4378c19a82322ae0026bf5eafe1584502d4dbe5/wsgi.py |
def channel_forwarded_tcp(self, windowSize, maxPacket, data): | def channel_forwarded_tcpip(self, windowSize, maxPacket, data): | def channel_forwarded_tcp(self, windowSize, maxPacket, data): remoteHP, origHP = forwarding.unpackOpen_forwarded_tcpip(data) if self.remoteForwards.has_key(remoteHP[1]): connectHP = self.remoteForwards[remoteHP[1]] return forwarding.SSHConnectForwardingChannel(connectHP, remoteWindow = windowSize, remoteMaxPacket = max... | 0d4d811ff929d868b5d2ffd1c91fd3bb9658f9f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0d4d811ff929d868b5d2ffd1c91fd3bb9658f9f5/connection.py |
def global_tcpip_forward(data): | def global_tcpip_forward(self, data): | def global_tcpip_forward(data): if self.transport.isClient: return 0 # no such luck hostToBind, portToBind = forwarding.unpackGlobal_tcpip_forward(data) if portToBind < 1024: return 0 # fix this later, for now don't even try from twisted.internet import reactor listener = reactor.listenTCP(portToBind, forwarding.SSHLis... | 0d4d811ff929d868b5d2ffd1c91fd3bb9658f9f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0d4d811ff929d868b5d2ffd1c91fd3bb9658f9f5/connection.py |
self.manager = service.manager def getUserName(self, request): p = self.getPerspective(request) if p: return p.perspectiveName else: return self.defaultUsername | def __init__(self, service): self.service = service | bd6102d819612a9b6694f73898b35fa12f91d912 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bd6102d819612a9b6694f73898b35fa12f91d912/gadgets.py | |
p = self.getPerspective(request) if p: p = p.perspectiveName write(self.service.manager.getForums(p or 'poster') | write(self.manager.getForums(self.getUserName(request)) | def stream(self, write, request): """Display the intro list of forums. This is only called if there is no URI. """ p = self.getPerspective(request) if p: p = p.perspectiveName write(self.service.manager.getForums(p or 'poster') .addCallback(self._cbForums)) | bd6102d819612a9b6694f73898b35fa12f91d912 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bd6102d819612a9b6694f73898b35fa12f91d912/gadgets.py |
write(self.service.manager.getTopMessages( request.args.get(['forum_id'][0])[0], 'poster'). addCallback(self._cbThreadData, request)) | forum_id = int(request.args.get(['forum_id'][0])[0]) d = self.manager.getTopMessages(forum_id, self.getUserName(request)).addCallback(self._cbThreadData, request) write(d) | def stream(self, write, request): write(self.service.manager.getTopMessages( request.args.get(['forum_id'][0])[0], 'poster'). addCallback(self._cbThreadData, request)) | bd6102d819612a9b6694f73898b35fa12f91d912 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bd6102d819612a9b6694f73898b35fa12f91d912/gadgets.py |
w( '<h3> %s:</h3>' % self.service.manager.getForumByID(forum_id) ) | w( '<h3> %s:</h3>' % self.manager.getForumByID(forum_id) ) | def _cbThreadData(self, data, request): forum_id = int(request.args.get('forum_id',[0])[0]) l = [] w = l.append w( '<h3> %s:</h3>' % self.service.manager.getForumByID(forum_id) ) w(''' <table cellpadding=4 cellspacing=1 border=0 width="95%"> <tr bgcolor="#ff9900"> <td COLOR="#000000"><b> Thread Subject </b> </td> <td C... | bd6102d819612a9b6694f73898b35fa12f91d912 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bd6102d819612a9b6694f73898b35fa12f91d912/gadgets.py |
write(self.service.manager.getFullMessages(self.forum_id, self.post_id, 'poster').addCallback(self._cbPostData)) | write(self.manager.getFullMessages(self.forum_id, self.post_id, self.getUserName(request)).addCallback(self._cbPostData)) | def stream(self, write, request): self.request = request self.forum_id = int(request.args.get('forum_id',[0])[0]) self.post_id = int(request.args.get('post_id',[0])[0]) print "Getting posts for thread %d for forum: %d" % (self.post_id, self.forum_id) write(self.service.manager.getFullMessages(self.forum_id, self.post_i... | bd6102d819612a9b6694f73898b35fa12f91d912 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bd6102d819612a9b6694f73898b35fa12f91d912/gadgets.py |
write( self.service.manager.getThreadMessages(self.forum_id, self.post_id).addCallback(self._cbPostData) ) | write( self.manager.getThreadMessages(self.forum_id, self.post_id).addCallback(self._cbPostData) ) | def stream(self, write, request): self.forum_id = int(request.args.get('forum_id',[0])[0]) self.post_id = int(request.args.get('post_id',[0])[0]) print "Getting posts for thread %d for forum: %d" % (self.post_id, self.forum_id) write( self.service.manager.getThreadMessages(self.forum_id, self.post_id).addCallback(self.... | bd6102d819612a9b6694f73898b35fa12f91d912 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bd6102d819612a9b6694f73898b35fa12f91d912/gadgets.py |
write( self.service.manager.getMessage(self.post_id).addCallback( self._cbDetailData) ) | write( self.manager.getMessage(self.post_id).addCallback( self._cbDetailData) ) | def stream(self, write, request): self.request = request self.post_id = int(request.args.get('post_id',[0])[0]) print "Getting details for post %d" % (self.post_id) write( self.service.manager.getMessage(self.post_id).addCallback( self._cbDetailData) ) | bd6102d819612a9b6694f73898b35fa12f91d912 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bd6102d819612a9b6694f73898b35fa12f91d912/gadgets.py |
return [self.service.manager.getMessage(self.post_id).addCallback(self._cbDetailData)] | return [self.manager.getMessage(self.post_id).addCallback(self._cbDetailData)] | def display(self, request): self.request = request self.post_id = int(request.args.get('post_id',[0])[0]) self.forum_id = int(request.args.get('forum_id',[0])[0]) self.thread_id = int(request.args.get('thread_id',[0])[0]) return [self.service.manager.getMessage(self.post_id).addCallback(self._cbDetailData)] | bd6102d819612a9b6694f73898b35fa12f91d912 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bd6102d819612a9b6694f73898b35fa12f91d912/gadgets.py |
write(self.service.manager.postMessage( | write(self.manager.postMessage( | def process(self, write, request, submit, subject, body, post_id, forum_id, thread_id): p = self.getPerspective(self.request) name = (p and p.perspectiveName) or 'anonymous' write(self.service.manager.postMessage( self.forum_id, name, self.thread_id, int(post_id), 0, subject, body).addCallback(self._cbPostDone)) write(... | bd6102d819612a9b6694f73898b35fa12f91d912 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bd6102d819612a9b6694f73898b35fa12f91d912/gadgets.py |
write(self.service.manager.newMessage(self.forum_id, name, subject, body).addCallback(self._cbPosted, subject, forum_id)) | write(self.manager.newMessage(self.forum_id, name, subject, body).addCallback(self._cbPosted, subject, forum_id)) | def process(self, write, request, submit, subject, body, forum_id): p = self.getPerspective(request) name = (p and p.perspectiveName) or 'anonymous' write(self.service.manager.newMessage(self.forum_id, name, subject, body).addCallback(self._cbPosted, subject, forum_id)) | bd6102d819612a9b6694f73898b35fa12f91d912 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bd6102d819612a9b6694f73898b35fa12f91d912/gadgets.py |
self.manager = service.manager | def __init__(self, service): self.service = service | bd6102d819612a9b6694f73898b35fa12f91d912 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bd6102d819612a9b6694f73898b35fa12f91d912/gadgets.py | |
failure.trap(self.service.manager.dbpool.dbapi.OperationalError) | failure.trap(self.manager.dbpool.dbapi.OperationalError) | def _errIdentity(self, failure): failure.trap(self.service.manager.dbpool.dbapi.OperationalError) return self.tryAgain("This identity is already taken.", self.request) | bd6102d819612a9b6694f73898b35fa12f91d912 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bd6102d819612a9b6694f73898b35fa12f91d912/gadgets.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.