rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
self.application.removeIdentity("web") | self.application.authorizer.removeIdentity("web") | def upgradeToVersion2(self): self.application.removeIdentity("web") del self.application.services[self.serviceName] del self.serviceName del self.application del self.perspectiveName | a7f55d3d84feaee3bac062ec7c971a5c2cea4247 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a7f55d3d84feaee3bac062ec7c971a5c2cea4247/distrib.py |
self._listenerDict = [] | self._listenerDict = {} | def __init__(self, name, uid=None, gid=None, authorizer=None, authorizer_=None): """Initialize me. | 442b4a536bc866786e0f14882cc60d50b2276f92 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/442b4a536bc866786e0f14882cc60d50b2276f92/app.py |
manager.loadObjectsFrom("testrooms").addCallback(gotDBRooms) | manager.loadObjectsFrom("testrooms").addCallbacks(gotDBRooms, fail) def fail(failure): print "FAILURE" print failure.getErrorMessage() reactor.stop() | def runTests(ignore=0): global manager print "running tests." manager.loadObjectsFrom("testrooms").addCallback(gotDBRooms) | bab83b2334ff22888211143cd7d31a7bc54d6980 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bab83b2334ff22888211143cd7d31a7bc54d6980/row_xml.py |
print "no rooms found!" main.shutDown() | raise DataException, "no rooms found!" | def dumpRooms(rooms): if not rooms: print "no rooms found!" main.shutDown() for room in rooms: print " ", room for child in room.furniture: print " ", child if hasattr(child, "childRows"): for inner in child.childRows: print " ", inner | bab83b2334ff22888211143cd7d31a7bc54d6980 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bab83b2334ff22888211143cd7d31a7bc54d6980/row_xml.py |
for obj in xmanager.rowCache.values(): | for obj in manager.rowCache.values(): | def gotDBRooms(rooms): print "------------ got rooms from database ------------" dumpRooms(rooms) for obj in xmanager.rowCache.values(): xmanager.insertRow(obj) xmanager.loadObjectsFrom("testrooms", data=None, whereClause=[("roomId",reflector.EQUAL, 12)]).addCallback(gotXMLRooms) | bab83b2334ff22888211143cd7d31a7bc54d6980 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bab83b2334ff22888211143cd7d31a7bc54d6980/row_xml.py |
xmanager.loadObjectsFrom("testrooms", data=None, whereClause=[("roomId",reflector.EQUAL, 12)]).addCallback(gotXMLRooms) | d = xmanager.loadObjectsFrom("testrooms", data=None, whereClause=[("roomId",reflector.EQUAL, 12)]) d.addCallback(gotXMLRooms) d.addErrback(fail) | def gotDBRooms(rooms): print "------------ got rooms from database ------------" dumpRooms(rooms) for obj in xmanager.rowCache.values(): xmanager.insertRow(obj) xmanager.loadObjectsFrom("testrooms", data=None, whereClause=[("roomId",reflector.EQUAL, 12)]).addCallback(gotXMLRooms) | bab83b2334ff22888211143cd7d31a7bc54d6980 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bab83b2334ff22888211143cd7d31a7bc54d6980/row_xml.py |
xmanager.loadObjectsFrom("testrooms", data=None, whereClause=[("roomId",reflector.EQUAL, 12)]).addCallback(gotXMLRooms2) | d = xmanager.loadObjectsFrom("testrooms", data=None, whereClause=[("roomId",reflector.EQUAL, 12)]) d.addCallback(gotXMLRooms2) d.addErrback(fail) | def gotXMLRooms(rooms): print "------------ got rooms from XML ------------" dumpRooms(rooms) xmanager.loadObjectsFrom("testrooms", data=None, whereClause=[("roomId",reflector.EQUAL, 12)]).addCallback(gotXMLRooms2) | bab83b2334ff22888211143cd7d31a7bc54d6980 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bab83b2334ff22888211143cd7d31a7bc54d6980/row_xml.py |
main.shutDown() | reactor.stop() | def gotXMLRooms2(rooms): print "------------ got rooms from XML again! ------------" main.shutDown() | bab83b2334ff22888211143cd7d31a7bc54d6980 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bab83b2334ff22888211143cd7d31a7bc54d6980/row_xml.py |
main.addTimeout(tick, 0.5) | reactor.callLater(0.5, tick) | def tick(): main.addTimeout(tick, 0.5) | bab83b2334ff22888211143cd7d31a7bc54d6980 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bab83b2334ff22888211143cd7d31a7bc54d6980/row_xml.py |
dbpool = adbapi.ConnectionPool("pyPgSQL.PgSQL", database="sean", host="localhost", port=5432) | dbpool = adbapi.ConnectionPool("pyPgSQL.PgSQL", database="test") | def tick(): main.addTimeout(tick, 0.5) | bab83b2334ff22888211143cd7d31a7bc54d6980 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bab83b2334ff22888211143cd7d31a7bc54d6980/row_xml.py |
manager = sqlreflector.SQLReflector(dbpool, [RoomRow, FurnitureRow, RugRow, LampRow], runTests) | manager = sqlreflector.SQLReflector(dbpool, [RoomRow, FurnitureRow, RugRow, LampRow]) runTests() | def kickOffTests(ignoredResult=0): global manager, xmanager xmanager = xmlreflector.XMLReflector("myXMLdb", [RoomRow, FurnitureRow, RugRow, LampRow] ) manager = sqlreflector.SQLReflector(dbpool, [RoomRow, FurnitureRow, RugRow, LampRow], runTests) | bab83b2334ff22888211143cd7d31a7bc54d6980 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bab83b2334ff22888211143cd7d31a7bc54d6980/row_xml.py |
main.addTimeout(tick, 0.5) main.addTimeout(kickOffTests, 0.4) | reactor.callLater(0.5, tick) reactor.callLater(0.4, kickOffTests) | def kickOffTests(ignoredResult=0): global manager, xmanager xmanager = xmlreflector.XMLReflector("myXMLdb", [RoomRow, FurnitureRow, RugRow, LampRow] ) manager = sqlreflector.SQLReflector(dbpool, [RoomRow, FurnitureRow, RugRow, LampRow], runTests) | bab83b2334ff22888211143cd7d31a7bc54d6980 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bab83b2334ff22888211143cd7d31a7bc54d6980/row_xml.py |
def initialize(self): | def setUp(self, request, node, data): | def initialize(self): self['type'] = 'checkbox' | 0815ea022f851ae2e2bcb7754a6b6f197e8cd751 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0815ea022f851ae2e2bcb7754a6b6f197e8cd751/widgets.py |
def initialize(self): | def setUp(self, request, node, data): | def initialize(self): self['type'] = 'radio' | 0815ea022f851ae2e2bcb7754a6b6f197e8cd751 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0815ea022f851ae2e2bcb7754a6b6f197e8cd751/widgets.py |
def initialize(self): | def setUp(self, request, node, data): | def initialize(self): self['type'] = 'file' | 0815ea022f851ae2e2bcb7754a6b6f197e8cd751 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0815ea022f851ae2e2bcb7754a6b6f197e8cd751/widgets.py |
def setUp(self, request, node, m): | def setUp(self, request, node, data): | def setUp(self, request, node, m): self['type'] = 'hidden' | 0815ea022f851ae2e2bcb7754a6b6f197e8cd751 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0815ea022f851ae2e2bcb7754a6b6f197e8cd751/widgets.py |
def initialize(self): | def setUp(self, request, node, data): | def initialize(self): self['type'] = 'text' | 0815ea022f851ae2e2bcb7754a6b6f197e8cd751 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0815ea022f851ae2e2bcb7754a6b6f197e8cd751/widgets.py |
def initialize(self): | def setUp(self, request, node, data): | def initialize(self): self['type'] = 'password' | 0815ea022f851ae2e2bcb7754a6b6f197e8cd751 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0815ea022f851ae2e2bcb7754a6b6f197e8cd751/widgets.py |
def initialize(self): | def setUp(self, request, node, data): | def initialize(self): self['type'] = 'button' | 0815ea022f851ae2e2bcb7754a6b6f197e8cd751 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0815ea022f851ae2e2bcb7754a6b6f197e8cd751/widgets.py |
seq = domhelpers.getIfExists(newNode,'listIndex') if seq: seq.setAttribute('value',str(itemNum)) | def _iterateData(self, parentNode, submodel, data): currentListItem = 0 for itemNum in range(len(data)): # theory: by appending copies of the li node # each node will be handled once we exit from # here because handleNode will then recurse into # the newly appended nodes | 0815ea022f851ae2e2bcb7754a6b6f197e8cd751 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0815ea022f851ae2e2bcb7754a6b6f197e8cd751/widgets.py | |
parentNode.appendChild(newNode) | retVal[itemNum] = newNode newNode.parentNode = parentNode parentNode.childNodes.extend(retVal) | def _iterateData(self, parentNode, submodel, data): currentListItem = 0 for itemNum in range(len(data)): # theory: by appending copies of the li node # each node will be handled once we exit from # here because handleNode will then recurse into # the newly appended nodes | 0815ea022f851ae2e2bcb7754a6b6f197e8cd751 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0815ea022f851ae2e2bcb7754a6b6f197e8cd751/widgets.py |
def quote(s): return urllib.quote(s) | def testData(self): for entry in self.data: raw = entry[0] quoted = entry[1:] | def quote(s): return urllib.quote(s) | 4c012f7357c0ef904a6dac6411f062bedd7a6228 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4c012f7357c0ef904a6dac6411f062bedd7a6228/test_postfix.py |
def unquote(s): return urllib.unquote(s) | self.assertEquals(postfix.quote(raw), quoted[0]) for q in quoted: self.assertEquals(postfix.unquote(q), raw) | def unquote(s): return urllib.unquote(s) | 4c012f7357c0ef904a6dac6411f062bedd7a6228 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4c012f7357c0ef904a6dac6411f062bedd7a6228/test_postfix.py |
class PostfixTCPMapServer(basic.LineReceiver, policies.TimeoutMixin): """Postfix mail transport agent TCP map protocol implementation. | class PostfixTCPMapServerTestCase: data = { } | def unquote(s): return urllib.unquote(s) | 4c012f7357c0ef904a6dac6411f062bedd7a6228 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4c012f7357c0ef904a6dac6411f062bedd7a6228/test_postfix.py |
Receive requests for data matching given key via lineReceived, asks it's factory for the data with dictionary-style access, and returns the data to the requester. | chat = [ ] | def unquote(s): return urllib.unquote(s) | 4c012f7357c0ef904a6dac6411f062bedd7a6228 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4c012f7357c0ef904a6dac6411f062bedd7a6228/test_postfix.py |
You can use postfix's postmap to test the map service:: | def testChat(self): factory = postfix.PostfixTCPMapDictServerFactory(self.data) output = StringIOWithoutClosing() transport = internet.protocol.FileWrapper(output) | def unquote(s): return urllib.unquote(s) | 4c012f7357c0ef904a6dac6411f062bedd7a6228 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4c012f7357c0ef904a6dac6411f062bedd7a6228/test_postfix.py |
/usr/sbin/postmap -q KEY tcp:localhost:4242 | protocol = postfix.PostfixTCPMapServer() protocol.service = factory protocol.factory = factory protocol.makeConnection(transport) | def unquote(s): return urllib.unquote(s) | 4c012f7357c0ef904a6dac6411f062bedd7a6228 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4c012f7357c0ef904a6dac6411f062bedd7a6228/test_postfix.py |
""" | for input, expected_output in self.chat: protocol.lineReceived(input) self.assertEquals(output.getvalue(), expected_output) output.truncate(0) protocol.setTimeout(None) | def unquote(s): return urllib.unquote(s) | 4c012f7357c0ef904a6dac6411f062bedd7a6228 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4c012f7357c0ef904a6dac6411f062bedd7a6228/test_postfix.py |
timeout = 600 delimiter = '\n' def connectionMade(self): self.setTimeout(self.timeout) def sendCode(self, code, message=''): "Send an SMTP-like code with a message." self.sendLine('%3.3d %s' % (code, message or '')) def lineReceived(self, line): self.resetTimeout() splitted = line.split(None) request = splitted[0] p... | class Valid(PostfixTCPMapServerTestCase, unittest.TestCase): data = { 'foo': 'ThisIs Foo', 'bar': ' bar really is found\r\n', } chat = [ ('get', "400 Command 'get' takes 1 parameters.\n"), ('get foo bar', "400 Command 'get' takes 1 parameters.\n"), ('put', "400 Command 'put' takes 2 parameters.\n"), ('put foo', "400 Co... | def unquote(s): return urllib.unquote(s) | 4c012f7357c0ef904a6dac6411f062bedd7a6228 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4c012f7357c0ef904a6dac6411f062bedd7a6228/test_postfix.py |
def getStateFor(self, actor): | def getStateFor(self, jellier): | def getStateFor(self, actor): return self.__dict__ | bec934b763042dbb03bcbf90f197802efe2498de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bec934b763042dbb03bcbf90f197802efe2498de/jelly.py |
jellier.jelly(self.getStateFor(actor))]) | jellier.jelly(self.getStateFor(jellier))]) | def jellyFor(self, jellier): sxp = jellier.prepare(self) sxp.extend([ str(self.__class__), jellier.jelly(self.getStateFor(actor))]) return jellier.preserve(self, sxp) | bec934b763042dbb03bcbf90f197802efe2498de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/bec934b763042dbb03bcbf90f197802efe2498de/jelly.py |
if len(self.data) != 5 or True: | if len(self.data) != 5: | def processEnded(self, reason): self.data = self.data.lstrip("a") if len(self.data) != 5 or True: self.elapsed = ValueError # XXX! else: self.elapsed = float(self.data) | a42caf7f2ab5d61279ff42fce0991058afe6ad1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a42caf7f2ab5d61279ff42fce0991058afe6ad1b/test_process.py |
reactor.clientTCP("localhost", 10081, client) | reactor.clientTCP("localhost", 10081, client, timeout=5) | def testFailing(self): client = ClosingProtocol() reactor.clientTCP("localhost", 10081, client) | e5f9520da8481f0872e88daaeba8bf355e5a478d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e5f9520da8481f0872e88daaeba8bf355e5a478d/test_tcp.py |
pass | if params: target = params[0] else: target = self.nickname | def irc_WHOIS(self, prefix, params): """Whois query | e2c8b60bc2ec68b14c450480fe935d0baded2950 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e2c8b60bc2ec68b14c450480fe935d0baded2950/ircservice.py |
if params: | if params and params[0]: | def irc_AWAY(self, prefix, params): """Away | e2c8b60bc2ec68b14c450480fe935d0baded2950 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e2c8b60bc2ec68b14c450480fe935d0baded2950/ircservice.py |
self.sendMessage("306", "You are now away.") | self.sendMessage(irc.RPL_NOWAWAY, "You are now away.") | def irc_AWAY(self, prefix, params): """Away | e2c8b60bc2ec68b14c450480fe935d0baded2950 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e2c8b60bc2ec68b14c450480fe935d0baded2950/ircservice.py |
self.sendMessage("305", "You are no longer away.") | self.sendMessage(irc.RPL_UNAWAY, "You are no longer away.") | def irc_AWAY(self, prefix, params): """Away | e2c8b60bc2ec68b14c450480fe935d0baded2950 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e2c8b60bc2ec68b14c450480fe935d0baded2950/ircservice.py |
if node.attributes.has_key('model'): del node.attributes['model'] if node.attributes.has_key('view'): del node.attributes['view'] if node.attributes.has_key('controller'): del node.attributes['controller'] | if not DEBUG: if node.attributes.has_key('model'): del node.attributes['model'] if node.attributes.has_key('view'): del node.attributes['view'] if node.attributes.has_key('controller'): del node.attributes['controller'] | def cleanNode(self, node): """ Do your part, prevent infinite recursion! """ if node.attributes.has_key('model'): del node.attributes['model'] if node.attributes.has_key('view'): del node.attributes['view'] if node.attributes.has_key('controller'): del node.attributes['controller'] return node | 1f55f9670675d6066f4225c638921c197af9cabb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/1f55f9670675d6066f4225c638921c197af9cabb/widgets.py |
if not self.outstandingCallbacks: | if isCallback and not self.outstandingCallbacks: | def handleControllerResults(self, controllerResult, request, node, controller, view, success): self.outstandingCallbacks -= 1 if isinstance(controllerResult, type(())): success, data = controllerResult else: data = controllerResult if isinstance(data, defer.Deferred): self.outstandingCallbacks += 1 data.addCallback(sel... | c0db2380a2d087d94714e21b441d82a8435165f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/c0db2380a2d087d94714e21b441d82a8435165f7/view.py |
self.sendNegativeResponse(tag, 'Authentication failed: ' + str(falure.value)) | self.sendNegativeResponse(tag, 'Authentication failed: ' + str(failure.value)) | def __ebAuthChunk(self, failure, tag): self.sendNegativeResponse(tag, 'Authentication failed: ' + str(falure.value)) | 62981320db4107f1fd02eb03e722fa963dc2f340 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/62981320db4107f1fd02eb03e722fa963dc2f340/imap4.py |
raise IllegalServerResponse(line) | raise IllegalServerResponse(parts) | def __cbSelect(self, (lines, tagline), rw): # In the absense of specification, we are free to assume: # READ-WRITE access datum = {'READ-WRITE': rw} 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 ... | 62981320db4107f1fd02eb03e722fa963dc2f340 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/62981320db4107f1fd02eb03e722fa963dc2f340/imap4.py |
'default': getattr(self, opt, None) | 'default': self.opts.get(opt, None) | def __str__(self, width=None): if not width: width = int(os.environ.get('COLUMNS', '80')) | 3cfb191bb6cc2b2197fc6598467351b3d28ffa00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/3cfb191bb6cc2b2197fc6598467351b3d28ffa00/usage.py |
obj = keys.getPublicKeyObject(options['filename']) | obj = keys.getPublicKeyObject(string) | def printFingerprint(options): if not options['filename']: filename = os.path.expanduser('~/.ssh/id_rsa') options['filename'] = raw_input('Enter file in which the key is (%s): ' % filename) if os.path.exists(options['filename']+'.pub'): options['filename'] += '.pub' try: string = keys.getPublicKeyString(options['filena... | eaea61181decce9c2b98c267e5abcf18b27db00d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/eaea61181decce9c2b98c267e5abcf18b27db00d/ckeygen.py |
ss = self._grabService(s) | ss = self._grabService(s, sclas) | def _grabService(self, svc, sclas): """ Find an instance of a particular class in a service collection and all subcollections. """ for s in svc.services.values(): if isinstance(s, sclas): return s if components.implements(s, IServiceCollection): ss = self._grabService(s) if ss: return ss | eb0a1bc44dae9155bf579e199129e068c1607622 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/eb0a1bc44dae9155bf579e199129e068c1607622/static.py |
f = open(self.path,'rb') | f = self.openForReading() | def render(self, request): """You know what you doing.""" | eb0a1bc44dae9155bf579e199129e068c1607622 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/eb0a1bc44dae9155bf579e199129e068c1607622/static.py |
return File(path, self.defaultType, self.allowExt, self.registry) | return self.__class__(path, self.defaultType, self.allowExt, self.registry) | def createSimilarFile(self, path): return File(path, self.defaultType, self.allowExt, self.registry) | eb0a1bc44dae9155bf579e199129e068c1607622 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/eb0a1bc44dae9155bf579e199129e068c1607622/static.py |
self.setHeader('content-length', str(len(body)-1)) | self.setHeader('content-length', len(body)) | def process(self): "Process a request." print "RESULT: Processing!?#!" # Log the request to a file. log.msg( self ) | 9f9af1fab26f8951c57c38f40161384c7424e8da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9f9af1fab26f8951c57c38f40161384c7424e8da/server.py |
def process(self): "Process a request." print "RESULT: Processing!?#!" # Log the request to a file. log.msg( self ) | 9f9af1fab26f8951c57c38f40161384c7424e8da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9f9af1fab26f8951c57c38f40161384c7424e8da/server.py | ||
self.setHeader('content-length',str(len(body)-1)) | self.setHeader('content-length', len(body)) | def process(self): "Process a request." print "RESULT: Processing!?#!" # Log the request to a file. log.msg( self ) | 9f9af1fab26f8951c57c38f40161384c7424e8da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9f9af1fab26f8951c57c38f40161384c7424e8da/server.py |
self.setHeader('content-length',str(len(body)-1)) | self.setHeader('content-length', len(body)) | def process(self): "Process a request." print "RESULT: Processing!?#!" # Log the request to a file. log.msg( self ) | 9f9af1fab26f8951c57c38f40161384c7424e8da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9f9af1fab26f8951c57c38f40161384c7424e8da/server.py |
return "Directory Listing For %s" % request.path[:-len('.idx')] | return "Directory Listing For %s" % request.path | def pagetitle(self, request): return "Directory Listing For %s" % request.path[:-len('.idx')] | e419d4581d33aee4ae2286e8dac97739a0d0ac11 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e419d4581d33aee4ae2286e8dac97739a0d0ac11/static.py |
if path == '.idx': if os.path.exists(os.path.join(self.path,self.indexName)): return error.NoResource() else: return DirectoryListing(self.path) | def getChild(self, path, request): """ Move 'zig'. For great justice. """ if path == '..': return error.NoResource() if path == '.idx': if os.path.exists(os.path.join(self.path,self.indexName)): return error.NoResource() else: return DirectoryListing(self.path) if path == '': path = self.indexName # This next step is s... | e419d4581d33aee4ae2286e8dac97739a0d0ac11 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e419d4581d33aee4ae2286e8dac97739a0d0ac11/static.py | |
request.prepath[-1] = self.indexName | if os.path.exists(os.path.join(self.path,self.indexName)): request.prepath[-1] = self.indexName else: return DirectoryListing(self.path) | def getChild(self, path, request): """ Move 'zig'. For great justice. """ if path == '..': return error.NoResource() if path == '.idx': if os.path.exists(os.path.join(self.path,self.indexName)): return error.NoResource() else: return DirectoryListing(self.path) if path == '': path = self.indexName # This next step is s... | e419d4581d33aee4ae2286e8dac97739a0d0ac11 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e419d4581d33aee4ae2286e8dac97739a0d0ac11/static.py |
if os.path.basename(self.path) == self.indexName: request.setResponseCode(http.MOVED_PERMANENTLY) request.setHeader("location","http://%s%s.idx" % ( request.getHeader("host"), (string.split(request.uri,'?')[0]))) return ' ' | def render(self, request): "You know what you doing." try: mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime =\ os.stat(self.path) except OSError: # This part is quite hacky, but it gets the job done. What I'm # saying here is to redirect to .idx (the directory index) if this # is supposed to be an index.html... | e419d4581d33aee4ae2286e8dac97739a0d0ac11 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e419d4581d33aee4ae2286e8dac97739a0d0ac11/static.py | |
if os.path.exists(os.path.join(self.path,self.indexName)): loc = '' else: loc = '.idx' request.setHeader("location","http://%s%s/%s" % ( | request.setHeader("location","http://%s%s/" % ( | def render(self, request): "You know what you doing." try: mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime =\ os.stat(self.path) except OSError: # This part is quite hacky, but it gets the job done. What I'm # saying here is to redirect to .idx (the directory index) if this # is supposed to be an index.html... | e419d4581d33aee4ae2286e8dac97739a0d0ac11 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e419d4581d33aee4ae2286e8dac97739a0d0ac11/static.py |
(string.split(request.uri,'?')[0]), loc)) | (string.split(request.uri,'?')[0]))) | def render(self, request): "You know what you doing." try: mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime =\ os.stat(self.path) except OSError: # This part is quite hacky, but it gets the job done. What I'm # saying here is to redirect to .idx (the directory index) if this # is supposed to be an index.html... | e419d4581d33aee4ae2286e8dac97739a0d0ac11 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e419d4581d33aee4ae2286e8dac97739a0d0ac11/static.py |
mutable[0] = (reactor.clientTCP(host, port, protocol, 30.0)) | mutable[0] = reactor.clientTCP(host, port, protocol, 30.0) | abcdef = re.sub('[^0-9, ]', '', line[4:]) | eec1f05e7fafe3c6336e41928ea4025e1fbb9005 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/eec1f05e7fafe3c6336e41928ea4025e1fbb9005/ftp.py |
pasvCmd.deferred.addCallbacks(doPassive, self.fail).arm() | pasvCmd.deferred.addCallbacks(doPassive, self.fail) pasvCmd.deferred.addErrback(lambda e,p=protocol: p.deferred.errback(e) or e) pasvCmd.deferred.arm() | abcdef = re.sub('[^0-9, ]', '', line[4:]) | eec1f05e7fafe3c6336e41928ea4025e1fbb9005 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/eec1f05e7fafe3c6336e41928ea4025e1fbb9005/ftp.py |
self.queueCommand(cmd) | abcdef = re.sub('[^0-9, ]', '', line[4:]) | eec1f05e7fafe3c6336e41928ea4025e1fbb9005 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/eec1f05e7fafe3c6336e41928ea4025e1fbb9005/ftp.py | |
return cmd.deferred | cmd.deferred.addErrback(lambda e,p=protocol: p.deferred.errback(e) or e) d = DeferredList([cmd.deferred, protocol.deferred]) | abcdef = re.sub('[^0-9, ]', '', line[4:]) | eec1f05e7fafe3c6336e41928ea4025e1fbb9005 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/eec1f05e7fafe3c6336e41928ea4025e1fbb9005/ftp.py |
class ProtocolWrapper(ObjectWrapper): def connectionLost(self): self.object.connectionLost() self.portCmd.transferDeferred.callback(None) | abcdef = re.sub('[^0-9, ]', '', line[4:]) | eec1f05e7fafe3c6336e41928ea4025e1fbb9005 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/eec1f05e7fafe3c6336e41928ea4025e1fbb9005/ftp.py | |
portCmd.protocol.portCmd = portCmd | def connectionLost(self): self.object.connectionLost() # Signal that transfer has completed self.portCmd.transferDeferred.callback(None) | eec1f05e7fafe3c6336e41928ea4025e1fbb9005 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/eec1f05e7fafe3c6336e41928ea4025e1fbb9005/ftp.py | |
d = DeferredList([portCmd.deferred, portCmd.transferDeferred, cmd.deferred]) def raiseOnFailure(deferredListResult): """Triggers errback if one (or more) of the Deferreds failed""" for status, value in deferredListResult: if status == FAILURE: raise value return deferredListResult[2][1] d.addCallback(raiseOnFailure)... | d = DeferredList([cmd.deferred, portCmd.deferred, portCmd.transferDeferred]) d.addCallback(raiseOnFailure) self.queueCommand(cmd) return d | def connectionLost(self): self.object.connectionLost() # Signal that transfer has completed self.portCmd.transferDeferred.callback(None) | eec1f05e7fafe3c6336e41928ea4025e1fbb9005 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/eec1f05e7fafe3c6336e41928ea4025e1fbb9005/ftp.py |
if not _logDateTimeUsers and _resetLogDateTimeID: | if (not _logDateTimeUsers and _resetLogDateTimeID and _resetLogDateTimeID.active()): | def _logDateTimeStop(): global _logDateTimeUsers _logDateTimeUsers -= 1; if not _logDateTimeUsers and _resetLogDateTimeID: _resetLogDateTimeID.cancel() | 0948f76564aa5f391aa7073287cc8914d0160b72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0948f76564aa5f391aa7073287cc8914d0160b72/http.py |
if len(args) != len(self.llist): raise TypeError("Wrong number of args, foo'!") | def __call__(self, *args): if len(args) != len(self.llist): raise TypeError("Wrong number of args, foo'!") | a4fd5e81870ad5263f09f53b5a0799cd6718eb97 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a4fd5e81870ad5263f09f53b5a0799cd6718eb97/eco.py | |
raise ParseError(*((el.tagName, name)+self.saveMark()+el._markpos)) | raise MismatchedTags(*((el.tagName, name)+self.saveMark()+el._markpos)) | def gotTagEnd(self, name): if self.caseInsensitive: name = name.lower() if self._shouldAutoClose == name: self._shouldAutoClose = '' else: self._autoclose() el = self.elementstack.pop() if el.tagName != name: raise ParseError(*((el.tagName, name)+self.saveMark()+el._markpos)) if not self.elementstack: self.documents.ap... | b28be84e9780b654948ebf7bb2327f4060e9f2d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b28be84e9780b654948ebf7bb2327f4060e9f2d1/microdom.py |
if hasattr(request, 'postpath') and not request.postpath and request.uri[-1] != '/': | if hasattr(request, 'postpath') and not request.postpath and string.split(request.uri,'?')[0][-1] != '/': | def getChild(self, path, request): """See twisted.web.Resource.getChild. """ if path == '..': return error.NoResource("Invalid request URL.") | 9dc23177b25d46b9aefecfa4d384288171a5d264 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9dc23177b25d46b9aefecfa4d384288171a5d264/static.py |
if hasattr(request, 'postpath') and not request.postpath and not self.getIndex(request): | if hasattr(request, 'postpath') and not request.postpath and \ not self.getIndex(request): | def getChild(self, path, request): """See twisted.web.Resource.getChild. """ if path == '..': return error.NoResource("Invalid request URL.") | 9dc23177b25d46b9aefecfa4d384288171a5d264 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9dc23177b25d46b9aefecfa4d384288171a5d264/static.py |
def ids(lst): ret = [] for x in lst: ret.append(id(x)) return ret | def ids(lst): ret = [] for x in lst: ret.append(id(x)) return ret | be087937f64d7d6248ddef8a58c52028509e5921 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/be087937f64d7d6248ddef8a58c52028509e5921/flow.py | |
"""Initialize with a RemoteReference and the name of this message. | """Initialize with a L{RemoteReference} and the name of this message. | def __init__(self, obj, name): """Initialize with a RemoteReference and the name of this message. """ self.obj = obj self.name = name | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
RemoteReference to a Perspective. When a method is called on that RemoteReference, it will translate to a method on the remote | L{RemoteReference} to a Perspective. When a method is called on that L{RemoteReference}, it will translate to a method on the remote | def printTraceback(tb): """Print a traceback (string) to the standard log. """ log.msg('Perspective Broker Traceback:' ) log.msg(tb) | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
on invoking methods on other objects, see ViewPoint.) | on invoking methods on other objects, see L{flavors.ViewPoint}.) | def printTraceback(tb): """Print a traceback (string) to the standard log. """ log.msg('Perspective Broker Traceback:' ) log.msg(tb) | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
twisted.cred.perspective.Perspective.attached; however, this method | L{twisted.cred.perspective.Perspective}.attached; however, this method | def brokerAttached(self, reference, identity, broker): """An intermediary method to override. | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
"""See brokerAttached. | """See L{brokerAttached}. | def brokerDetached(self, reference, identity, broker): """See brokerAttached. """ return self.detached(reference, identity) | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
self.perspective_%(message)s(*broker.unserialize(args), **broker.unserialize(kw)) | | self.perspective_%(message)s(*broker.unserialize(args), | **broker.unserialize(kw)) | def perspectiveMessageReceived(self, broker, message, args, kw): """This method is called when a network message is received. | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
pb.Perspective rather than a perspective.Perspective. | L{pb.Perspective} rather than a L{twisted.cred.perspective.Perspective}. | def perspectiveMessageReceived(self, broker, message, args, kw): """This method is called when a network message is received. | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
I may be a reference to a ViewPoint, a Referenceable, or a Perspective. From the client's perspective, it is not possible to tell which except by convention. | I may be a reference to a L{flavors.ViewPoint}, a L{flavors.Referenceable}, or a L{Perspective}. From the client's perspective, it is not possible to tell which except by convention. | def __init__(self, object, messageType="remote"): """Initialize me with an object. """ self.remoteMessageReceived = getattr(object, messageType + "MessageReceived") | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
See also twisted.internet.defer. | See also L{twisted.internet.defer}. | def __init__(self, object, messageType="remote"): """Initialize me with an object. """ self.remoteMessageReceived = getattr(object, messageType + "MessageReceived") | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
Arguments: * name: the name of the remote method to invoke * *args: arguments to serialize for the remote function * **kw: keyword arguments to serialize for the remote function. Returns: a Deferred which will be fired when the result of this remote call is received. | @type name: C{string} @param name: the name of the remote method to invoke @param args: arguments to serialize for the remote function @param kw: keyword arguments to serialize for the remote function. @rtype: L{twisted.internet.defer.Deferred} @returns: a Deferred which will be fired when the result of this remo... | def callRemote(self, name, *args, **kw): """Asynchronously invoke a remote method. | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
"""Get a RemoteMethod for this key. | """Get a L{RemoteMethod} for this key. | def remoteMethod(self, key): """Get a RemoteMethod for this key. """ return RemoteMethod(self, key) | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
"""Compare me [to another RemoteReference]. | """Compare me [to another L{RemoteReference}]. | def __cmp__(self,other): """Compare me [to another RemoteReference]. """ if isinstance(other, RemoteReference): if other.broker == self.broker: return cmp(self.luid, other.luid) return cmp(self.broker, other) | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
"""A RemoteCopy and Copyable version of failure.Failure for serialization.""" | """ A L{flavors.RemoteCopy} and L{flavors.Copyable} version of L{twisted.python.failure.Failure} for serialization. """ | def decref(self): """Decrement and return my reference count. """ self.refcount = self.refcount - 1 return self.refcount | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
"""Respond to stock 'didNotUnderstand' message. | """Respond to stock 'C{didNotUnderstand}' message. | def proto_didNotUnderstand(self, command): """Respond to stock 'didNotUnderstand' message. | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
self.registerReference, or None if XXX:Unfinished thought:XXX | self.L{registerReference}, or C{None} if XXX:Unfinished thought:XXX | def localObjectForID(self, luid): """Get a local object for a locally unique ID. | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
"""Returns an ID that says what this instance is cached as remotely, or None if it's not. | """Returns an ID that says what this instance is cached as remotely, or C{None} if it's not. | def cachedRemotelyAs(self, instance, incref=0): """Returns an ID that says what this instance is cached as remotely, or None if it's not. """ | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
"""I delegate most functionality to a identity.Identity. | """I delegate most functionality to a L{twisted.cred.identity.Identity}. | def detach(self): self.perspective.brokerDetached(self.remoteRef, self.identity, self.broker) | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
See also: AuthRoot | See also: L{AuthRoot} | def _authFail(self, result, d): d.callback(None) | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
"""(Internal) Does callbacks for getObjectAt. | """(Internal) Does callbacks for L{getObjectAt}. | def mkchallenge(self, ident): if type(ident) == types.StringType: # it's an error, so we must fail. challenge = identity.challenge() return challenge, AuthChallenger(None, self, challenge) else: challenge = ident.challenge() return challenge, AuthChallenger(ident, self, challenge) | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
@returns A pair: A ClientFactory and a Deferred which will be passed a remote reference to the root object of a PB server.x | @returns: A pair: A ClientFactory and a Deferred which will be passed a remote reference to the root object of a PB server.x | def getObjectRetreiver(): """Get a factory which retreives a root object from its client @returns A pair: A ClientFactory and a Deferred which will be passed a remote reference to the root object of a PB server.x """ d = defer.Deferred() b = Broker(1) bf = BrokerClientFactory(b) _ObjectRetrieval(b, d) return bf, d | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
"""Establishes a PB connection and returns with a RemoteReference. | """Establishes a PB connection and returns with a L{RemoteReference}. | def getObjectAt(host, port, timeout=None): """Establishes a PB connection and returns with a RemoteReference. @param host: the host to connect to @param port: the port number to connect to @param timeout: a value in milliseconds to wait before failing by default. (OPTIONAL) @returns A Deferred which will be passed ... | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
@returns A Deferred which will be passed a remote reference to the | @returns: A Deferred which will be passed a remote reference to the | def getObjectAt(host, port, timeout=None): """Establishes a PB connection and returns with a RemoteReference. @param host: the host to connect to @param port: the port number to connect to @param timeout: a value in milliseconds to wait before failing by default. (OPTIONAL) @returns A Deferred which will be passed ... | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
@returns A Deferred which will be passed a remote reference to the | @returns: A Deferred which will be passed a remote reference to the | def getObjectAtSSL(host, port, timeout=None): """Establishes a PB connection over SSL and returns with a RemoteReference. @param host: the host to connect to @param port: the port number to connect to @param timeout: a value in milliseconds to wait before failing by default. (OPTIONAL) @returns A Deferred which wi... | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
host -- the host the service is running on port -- the port on the host to connect to username -- the name you will be identified as to the authorizer password -- the password for this username serviceName -- name of the service to request | - host -- the host the service is running on - port -- the port on the host to connect to - username -- the name you will be identified as to the authorizer - password -- the password for this username - serviceName -- name of the service to request | def connect(host, port, username, password, serviceName, perspectiveName=None, client=None, timeout=None): """Connects and authenticates, then retrieves a PB service. Required arguments: host -- the host the service is running on port -- the port on the host to connect to username -- the name you will be identified as... | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
perspectiveName -- the name of the perspective to request, if | - perspectiveName -- the name of the perspective to request, if | def connect(host, port, username, password, serviceName, perspectiveName=None, client=None, timeout=None): """Connects and authenticates, then retrieves a PB service. Required arguments: host -- the host the service is running on port -- the port on the host to connect to username -- the name you will be identified as... | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
client -- XXX the \"reference\" argument to | - client -- XXX the \"reference\" argument to | def connect(host, port, username, password, serviceName, perspectiveName=None, client=None, timeout=None): """Connects and authenticates, then retrieves a PB service. Required arguments: host -- the host the service is running on port -- the port on the host to connect to username -- the name you will be identified as... | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
timeout -- see twisted.internet.tcp.Client Returns: A Deferred instance that gets a callback when the final Perspective is connected, and an errback when an error occurs at any stage of connecting. | - timeout -- see twisted.internet.tcp.Client @returns: A Deferred instance that gets a callback when the final Perspective is connected, and an errback when an error occurs at any stage of connecting. | def connect(host, port, username, password, serviceName, perspectiveName=None, client=None, timeout=None): """Connects and authenticates, then retrieves a PB service. Required arguments: host -- the host the service is running on port -- the port on the host to connect to username -- the name you will be identified as... | 9b600db79aad2a6fd13a29747f2b511f6c93e95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b600db79aad2a6fd13a29747f2b511f6c93e95c/pb.py |
def run(): if len(sys.argv) != 2: print "Usage: python zshcomp.py <output directory>\n" \ " python zshcomp.py -d\n" \ "where <output directory> is the path to write\n" \ "the completion function files to. Or specify -d to use\n" \ "the defualt output dir. (.../twisted/python/zsh of the\n" \ "current Twisted insta... | fa7ce136f34899ad4b652162be794047e8a78681 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/fa7ce136f34899ad4b652162be794047e8a78681/zshcomp.py | ||
if self.childNodes or self.tagName.lower() in ('a', 'li', 'div', 'span'): | if self.childNodes or self.tagName.lower() in ('a', 'li', 'div', 'span', 'title'): | def writexml(self, stream, indent='', addindent='', newl='', strip=0): # write beginning w = stream.write w(newl+indent+"<") w(self.tagName) for attr, val in self.attributes.items(): w(" ") w(attr) w("=") w('"') w(html.escape(val)) w('"') if self.childNodes or self.tagName.lower() in ('a', 'li', 'div', 'span'): w(">") ... | 47fce5f963f0fcec640575530dc5e382b169ad57 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/47fce5f963f0fcec640575530dc5e382b169ad57/microdom.py |
reactor.clientTCP('localhost', FTP_PORT, client) | factory = ClientFactory() factory.buildProtocol = lambda s, c=client: c reactor.connectTCP('localhost', FTP_PORT, factory) | def testFileListings(self): if hasattr(self, 'result'): del self.result | 45bc6b89ef6d6e4b6238f6e24e3a10149acc387d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/45bc6b89ef6d6e4b6238f6e24e3a10149acc387d/test_ftp.py |
reactor.clientTCP('localhost', FTP_PORT, client) | factory = ClientFactory() factory.buildProtocol = lambda s, c=client: c reactor.connectTCP('localhost', FTP_PORT, factory) | def testRetr(self): if hasattr(self, 'result'): del self.result | 45bc6b89ef6d6e4b6238f6e24e3a10149acc387d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/45bc6b89ef6d6e4b6238f6e24e3a10149acc387d/test_ftp.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.