Changeset 3053
- Timestamp:
- 02/13/08 17:54:28 (10 months ago)
- Files:
-
- ipython1/branches/ipython1-client-r3021/README (modified) (1 diff)
- ipython1/branches/ipython1-client-r3021/docs/ChangeLog (modified) (6 diffs)
- ipython1/branches/ipython1-client-r3021/docs/examples/DistributedHelloWorld.py (modified) (1 diff)
- ipython1/branches/ipython1-client-r3021/docs/examples/PBHelloWorld.py (modified) (1 diff)
- ipython1/branches/ipython1-client-r3021/docs/examples/fetchparse.py (modified) (2 diffs)
- ipython1/branches/ipython1-client-r3021/docs/examples/mcdriver.py (modified) (1 diff)
- ipython1/branches/ipython1-client-r3021/docs/examples/multiengine.ipy (modified) (9 diffs)
- ipython1/branches/ipython1-client-r3021/docs/examples/nwmerge.py (modified) (1 diff)
- ipython1/branches/ipython1-client-r3021/docs/examples/parallel_pylab.ipy (modified) (1 diff)
- ipython1/branches/ipython1-client-r3021/docs/examples/plotting_frontend.py (modified) (1 diff)
- ipython1/branches/ipython1-client-r3021/docs/examples/rmt.ipy (modified) (1 diff)
- ipython1/branches/ipython1-client-r3021/docs/examples/task1.py (modified) (1 diff)
- ipython1/branches/ipython1-client-r3021/docs/examples/task_profiler.py (modified) (2 diffs)
- ipython1/branches/ipython1-client-r3021/docs/tutorial/sec1.ipy (modified) (2 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/config/api.py (modified) (4 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/config/cutils.py (modified) (2 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/core/interpreter.py (modified) (2 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/fileop.py (modified) (7 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/method/mkcol.py (modified) (3 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/method/propfind.py (modified) (4 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/method/proppatch.py (modified) (7 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/method/report.py (modified) (1 diff)
- ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/method/report_expand.py (modified) (3 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/fileupload.py (modified) (6 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/stream.py (modified) (1 diff)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/asynclient.py (modified) (3 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/client.py (modified) (3 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/controllerservice.py (modified) (13 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/enginepb.py (modified) (23 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/engineservice.py (modified) (26 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/magic.py (modified) (1 diff)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/multiengine.py (modified) (41 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/multiengineclient.py (modified) (25 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/multienginehttp.py (modified) (44 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/multienginexmlrpc.py (modified) (19 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/pbutil.py (modified) (1 diff)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/pendingdeferred.py (modified) (10 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/scripts/ipcluster.py (modified) (2 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/scripts/ipcontroller.py (modified) (3 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/scripts/ipengine.py (modified) (3 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/task.py (modified) (34 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/taskclient.py (modified) (3 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/taskhttp.py (modified) (4 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/taskpb.py (modified) (3 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/taskxmlrpc.py (modified) (7 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/tests/controllertest.py (modified) (4 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/tests/engineservicetest.py (modified) (16 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/tests/multienginetest.py (modified) (40 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/tests/tasktest.py (modified) (9 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/tests/test_enginepb.py (modified) (3 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/tests/test_pendingdeferred.py (modified) (4 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/tests/tgenerator.py (modified) (2 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/kernel/tools.py (modified) (1 diff)
- ipython1/branches/ipython1-client-r3021/ipython1/notebook/config/__init__.py (modified) (2 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/notebook/dbutil.py (modified) (2 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/notebook/scripts/ipnotebook.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
ipython1/branches/ipython1-client-r3021/README
r2820 r3053 155 155 Now you can see what engines are registered with the controller:: 156 156 157 >>> rc.get IDs()157 >>> rc.get_ids() 158 158 [0,1,2,3] 159 159 ipython1/branches/ipython1-client-r3021/docs/ChangeLog
r3021 r3053 6 6 only have one implementation (and always will). 7 7 8 * ipython1.kernel: Created new push Function/pullFunctions in the API8 * ipython1.kernel: Created new push_function/pull_functions in the API 9 9 of the engines. These functions now have all the needed logic for 10 10 pushing/pulling functions. The logic has been removed from regular … … 32 32 methods have been adapted to take functions now. This approach 33 33 doesn't work for classes that are callable though. Still need 34 to add tests of how push/pull Serialized handle this.34 to add tests of how push/pull_serialized handle this. 35 35 36 36 … … 48 48 49 49 * ipython1.kernel.task.py: Created a new TaskResult object 50 that is returned when get TaskResult is called. This new50 that is returned when get_task_result is called. This new 51 51 object provide a much simpler and intuitive way of accessing 52 52 the results of a task. The variables that are pulled back 53 53 are available as attributes of the TaskResult object. There 54 are also engine ID, taskIDattributes. Failures are handled54 are also engineid, taskid attributes. Failures are handled 55 55 through a failure attribute, but remote exceptions can also 56 56 be reraised by calling the raiseException method. 57 57 58 58 * ipython1.kernel.taskclient/taskxmlrpc.py: Minor changes to reflect 59 new TaskResult object that is returned by get TaskResult.59 new TaskResult object that is returned by get_task_result. 60 60 61 61 * doc/examples: Updated TaskController examples to use new … … 72 72 actually raise any exceptions that it gets. Made sure that 73 73 SyntaxError/IndentationError is raised upon compilation. Added 74 reset and get Result. All the changes in core should eventually74 reset and get_result. All the changes in core should eventually 75 75 be merged in with core1. 76 76 … … 84 84 85 85 * ipython1.test: updated tests to work with the new core. 86 Added a new t estgenerator.py to make writing tests easier.86 Added a new tgenerator.py to make writing tests easier. 87 87 88 88 … … 98 98 * ipython1.kernel.multiengineclient.py: Got rid of ifoo methods 99 99 and replaced them by types with custom __repr__ methods. ipull 100 is now zip Pull. Got rid of slicing and indexing notation in100 is now zip_pull. Got rid of slicing and indexing notation in 101 101 client class. It led to an API that was simply too complex. 102 102 ipython1/branches/ipython1-client-r3021/docs/examples/DistributedHelloWorld.py
r3043 r3053 9 9 10 10 mec.execute('import time') 11 helloTaskId = tc.run(client.Task('time.sleep(3) ; word = "Hello,"', resultNames=['word']))12 worldTaskId = tc.run(client.Task('time.sleep(3) ; word = "World!"', resultNames=['word']))11 helloTaskId = tc.run(client.Task('time.sleep(3) ; word = "Hello,"', pull=['word'])) 12 worldTaskId = tc.run(client.Task('time.sleep(3) ; word = "World!"', pull=['word'])) 13 13 14 print tc.get TaskResult(helloTaskId).ns.word, tc.getTaskResult(worldTaskId).ns.word14 print tc.get_task_result(helloTaskId).ns.word, tc.get_task_result(worldTaskId).ns.word ipython1/branches/ipython1-client-r3021/docs/examples/PBHelloWorld.py
r2305 r3053 19 19 def connected(perspective): 20 20 client = PBTaskClient(perspective) 21 client.run(kernel.Task('x = "hello"', resultNames=['x'])).addCallbacks(success, failure)22 client.run(kernel.Task('raise ValueError, "pants"', resultNames=['x'])).addCallbacks(success, failure)21 client.run(kernel.Task('x = "hello"', pull=['x'])).addCallbacks(success, failure) 22 client.run(kernel.Task('raise ValueError, "pants"', pull=['x'])).addCallbacks(success, failure) 23 23 print "connected." 24 24 ipython1/branches/ipython1-client-r3021/docs/examples/fetchparse.py
r3043 r3053 54 54 if url.startswith(self.site): 55 55 print ' ', url 56 self.linksWorking[url] = self.tc.run(client.Task('links = fetchAndParse(url)', resultNames=['links'], setupNS={'url': url}))56 self.linksWorking[url] = self.tc.run(client.Task('links = fetchAndParse(url)', pull=['links'], push={'url': url})) 57 57 58 58 def onVisitDone(self, result, url): … … 77 77 def synchronize(self): 78 78 for url, taskId in self.linksWorking.items(): 79 # Calling get TaskResult with block=False will return None if the79 # Calling get_task_result with block=False will return None if the 80 80 # task is not done yet. This provides a simple way of polling. 81 result = self.tc.get TaskResult(taskId, block=False)81 result = self.tc.get_task_result(taskId, block=False) 82 82 if result is not None: 83 83 self.onVisitDone(result, url) ipython1/branches/ipython1-client-r3021/docs/examples/mcdriver.py
r3043 r3053 28 28 29 29 # Submit tasks 30 task IDs = []30 taskids = [] 31 31 for K in K_vals: 32 32 for sigma in sigma_vals: 33 33 t = client.Task(task_string, 34 setupNS=dict(sigma=sigma,K=K),35 resultNames=['vp','ap','vc','ac','sigma','K'])36 task IDs.append(tc.run(t))34 push=dict(sigma=sigma,K=K), 35 pull=['vp','ap','vc','ac','sigma','K']) 36 taskids.append(tc.run(t)) 37 37 38 print "Submitted tasks: ", task IDs38 print "Submitted tasks: ", taskids 39 39 40 40 # Block until tasks are completed 41 tc.barrier(task IDs)41 tc.barrier(taskids) 42 42 43 43 # Get the results 44 results = [tc.get TaskResult(tid) for tid in taskIDs]44 results = [tc.get_task_result(tid) for tid in taskids] 45 45 46 46 # Assemble the result ipython1/branches/ipython1-client-r3021/docs/examples/multiengine.ipy
r3049 r3053 18 18 mec.activate() 19 19 mec.block = True 20 mec.get IDs()20 mec.get_ids() 21 21 n = len(mec) 22 22 assert n >= 4, "Not Enough Engines: %i, 4 needed for this script"%n … … 47 47 mec.execute('print a') 48 48 49 for id in mec.get IDs():49 for id in mec.get_ids(): 50 50 mec.execute('b=%d' % id, targets=id) 51 51 … … 92 92 mec.push(dict(a=10, b=30, c={'f':range(10)})) 93 93 mec.pull(('a', 'b')) 94 mec.zip Pull(('a', 'b'))95 96 for id in mec.get IDs():94 mec.zip_pull(('a', 'b')) 95 96 for id in mec.get_ids(): 97 97 mec.push(dict(a=id), targets=id) 98 98 99 99 100 for id in mec.get IDs():100 for id in mec.get_ids(): 101 101 mec.pull('a', targets=id) 102 102 … … 108 108 mec['a'] 109 109 110 # get Result/reset/keys111 112 mec.get Result()110 # get_result/reset/keys 111 112 mec.get_result() 113 113 %result 114 114 mec.keys() … … 123 123 124 124 %px a = 5 125 mec.get Result(1)125 mec.get_result(1) 126 126 mec.keys() 127 127 … … 132 132 133 133 134 mec.queue Status()134 mec.queue_status() 135 135 time.sleep(3.0) 136 mec.clear Queue()137 mec.queue Status()136 mec.clear_queue() 137 mec.queue_status() 138 138 time.sleep(2.0) 139 mec.queue Status()139 mec.queue_status() 140 140 141 141 mec.barrier(prs) … … 195 195 196 196 pr1 = mec.push(dict(a=10)) 197 pr1.get Result()197 pr1.get_result() 198 198 pr2 = mec.pull('a') 199 199 pr2.r … … 207 207 208 208 try: 209 pd1.get Result()209 pd1.get_result() 210 210 except InvalidDeferredID: 211 211 print "PendingResult object was cleared OK." … … 213 213 214 214 try: 215 pd2.get Result()215 pd2.get_result() 216 216 except InvalidDeferredID: 217 217 print "PendingResult object was cleared OK." ipython1/branches/ipython1-client-r3021/docs/examples/nwmerge.py
r3043 r3053 88 88 from ipython1.kernel import client 89 89 ipc = client.RemoteController(('127.0.0.1',10105)) 90 print 'Engine IDs:',ipc.get IDs()90 print 'Engine IDs:',ipc.get_ids() 91 91 92 92 # Make a set of 'sorted datasets' ipython1/branches/ipython1-client-r3021/docs/examples/parallel_pylab.ipy
r3043 r3053 25 25 # Get an IPython1 client 26 26 rc = client.MultiEngineController(('127.0.0.1',10105)) 27 rc.get IDs()27 rc.get_ids() 28 28 rc.activate() 29 29 ipython1/branches/ipython1-client-r3021/docs/examples/plotting_frontend.py
r3043 r3053 23 23 # Get an IPython1 client 24 24 rc = client.RemoteController(('127.0.0.1',10105)) 25 rc.get IDs()25 rc.get_ids() 26 26 27 27 # Run the simulation on all the engines ipython1/branches/ipython1-client-r3021/docs/examples/rmt.ipy
r3043 r3053 29 29 30 30 def parallelDiffs(rc, num, N): 31 nengines = len(rc.get IDs())31 nengines = len(rc.get_ids()) 32 32 num_per_engine = num/nengines 33 33 print "Running with", num_per_engine, "per engine." ipython1/branches/ipython1-client-r3021/docs/examples/task1.py
r3043 r3053 12 12 """ 13 13 14 t1 = client.Task(cmd1, clear Before=False, clearAfter=True, resultNames=['a','b','c'])14 t1 = client.Task(cmd1, clear_before=False, clear_after=True, pull=['a','b','c']) 15 15 tid1 = tc.run(t1) 16 tr1 = tc.get TaskResult(tid1,block=True)16 tr1 = tc.get_task_result(tid1,block=True) 17 17 tr1.raiseException() 18 18 print "a, b: ", tr1.ns.a, tr1.ns.b ipython1/branches/ipython1-client-r3021/docs/examples/task_profiler.py
r3046 r3053 51 51 52 52 rc.block=True 53 nengines = len(rc.get IDs())53 nengines = len(rc.get_ids()) 54 54 rc.execute('from IPython.genutils import time') 55 55 … … 62 62 time.sleep(1) 63 63 start = time.time() 64 task IDs = [tc.run(t) for t in tasks]65 tc.barrier(task IDs)64 taskids = [tc.run(t) for t in tasks] 65 tc.barrier(taskids) 66 66 stop = time.time() 67 67 ipython1/branches/ipython1-client-r3021/docs/tutorial/sec1.ipy
r2305 r3053 5 5 import ipython1.kernel.api as kernel 6 6 rc = kernel.RemoteController(('127.0.0.1',10105)) 7 rc.get IDs() # get the IDs of the available engines7 rc.get_ids() # get the IDs of the available engines 8 8 rc.resetAll() # REMOVE 9 9 … … 26 26 rc.executeAll('import time') # blocking 27 27 pr = rc.executeAll('time.sleep(5)',block=False) # non-blocking, returns a PendingResult object 28 pr.get Result() # now block for the result28 pr.get_result() # now block for the result 29 29 pr = rc.executeAll('time.sleep(5)', block=False) 30 pr.get Result(block=False) # See if result is ready but don't block31 pr.r # Shorthand for get Result(block=True)30 pr.get_result(block=False) # See if result is ready but don't block 31 pr.r # Shorthand for get_result(block=True) 32 32 rc.block = False # now commands won't block by default 33 33 rc.executeAll('y = [x**4 for x in xrange(1000)]') # non-blocking ipython1/branches/ipython1-client-r3021/ipython1/config/api.py
r2866 r3053 14 14 15 15 import os 16 from ipython1.config.cutils import get HomeDir, getIpythonDir16 from ipython1.config.cutils import get_home_dir, get_ipython_dir 17 17 from ipython1.external.configobj import ConfigObj 18 18 … … 23 23 self.current.indent_type = ' ' 24 24 self.filename = filename 25 self.write DefaultConfigFile()25 self.write_default_config_file() 26 26 27 def get ConfigObj(self):27 def get_config_obj(self): 28 28 return self.current 29 29 30 def update ConfigObj(self, newConfig):30 def update_config_obj(self, newConfig): 31 31 self.current.merge(newConfig) 32 32 33 def update ConfigObjFromFile(self, filename):33 def update_config_obj_from_file(self, filename): 34 34 newConfig = ConfigObj(filename, file_error=False) 35 35 self.current.merge(newConfig) 36 36 37 def update ConfigObjFromDefaultFile(self, ipythondir=None):38 fname = self.resolve FilePath(self.filename, ipythondir)39 self.update ConfigObjFromFile(fname)37 def update_config_obj_from_default_file(self, ipythondir=None): 38 fname = self.resolve_file_path(self.filename, ipythondir) 39 self.update_config_obj_from_file(fname) 40 40 41 def write ConfigObjToFile(self, filename):41 def write_config_obj_to_file(self, filename): 42 42 f = open(filename, 'w') 43 43 self.current.write(f) 44 44 f.close() 45 45 46 def write DefaultConfigFile(self):47 ipdir = get IpythonDir()46 def write_default_config_file(self): 47 ipdir = get_ipython_dir() 48 48 fname = ipdir + '/' + self.filename 49 49 if not os.path.isfile(fname): 50 50 print "Writing the configuration file to: " + fname 51 self.write ConfigObjToFile(fname)51 self.write_config_obj_to_file(fname) 52 52 53 53 def _import(self, key): … … 59 59 return temp 60 60 61 def resolve FilePath(self, filename, ipythondir = None):61 def resolve_file_path(self, filename, ipythondir = None): 62 62 """Resolve filenames into absolute paths. 63 63 … … 84 84 return trythis 85 85 86 trythis = get IpythonDir() + '/' + filename86 trythis = get_ipython_dir() + '/' + filename 87 87 if os.path.isfile(trythis): 88 88 return trythis ipython1/branches/ipython1-client-r3021/ipython1/config/cutils.py
r2786 r3053 27 27 pass 28 28 29 def get HomeDir():29 def get_home_dir(): 30 30 """Return the closest possible equivalent to a 'home' directory. 31 31 … … 82 82 raise HomeDirError,'support for your operating system not implemented.' 83 83 84 def get IpythonDir():84 def get_ipython_dir(): 85 85 ipdir_def = '.ipython' 86 home_dir = get HomeDir()86 home_dir = get_home_dir() 87 87 ipdir = os.path.abspath(os.environ.get('IPYTHONDIR', 88 88 os.path.join(home_dir,ipdir_def))) ipython1/branches/ipython1-client-r3021/ipython1/core/interpreter.py
r3036 r3053 441 441 self.user_ns.update(ns) 442 442 443 def push Function(self, ns):443 def push_function(self, ns): 444 444 # First set the func_globals for all functions to self.user_ns 445 445 new_kwds = {} … … 545 545 return result 546 546 547 def pull Function(self, keys):547 def pull_function(self, keys): 548 548 return self.pull(keys) 549 549 ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/fileop.py
r2063 r3053 205 205 yield response 206 206 try: 207 response = response.get Result()207 response = response.get_result() 208 208 finally: 209 209 source_stream.close() … … 220 220 response = waitForDeferred(delete(destination_uri, destination_filepath)) 221 221 yield response 222 response = response.get Result()222 response = response.get_result() 223 223 checkResponse(response, "delete", responsecode.NO_CONTENT) 224 224 success_code = responsecode.NO_CONTENT … … 287 287 response = waitForDeferred(copy(FilePath(source_path), FilePath(destination_path), destination_uri, depth)) 288 288 yield response 289 response = response.get Result()289 response = response.get_result() 290 290 checkResponse(response, "copy", responsecode.NO_CONTENT) 291 291 … … 358 358 response = waitForDeferred(delete(destination_uri, destination_filepath)) 359 359 yield response 360 response = response.get Result()360 response = response.get_result() 361 361 checkResponse(response, "delete", responsecode.NO_CONTENT) 362 362 … … 384 384 response = waitForDeferred(copy(source_filepath, destination_filepath, destination_uri, depth)) 385 385 yield response 386 response = response.get Result()386 response = response.get_result() 387 387 checkResponse(response, "copy", responsecode.CREATED, responsecode.NO_CONTENT) 388 388 389 389 response = waitForDeferred(delete(source_uri, source_filepath)) 390 390 yield response 391 response = response.get Result()391 response = response.get_result() 392 392 checkResponse(response, "delete", responsecode.NO_CONTENT) 393 393 … … 435 435 response = waitForDeferred(delete(uri, filepath)) 436 436 yield response 437 response = response.get Result()437 response = response.get_result() 438 438 checkResponse(response, "delete", responsecode.NO_CONTENT) 439 439 … … 457 457 x = waitForDeferred(readIntoFile(stream, resource_file)) 458 458 yield x 459 x.get Result()459 x.get_result() 460 460 except: 461 461 raise HTTPError(statusForFailure( ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/method/mkcol.py
r2063 r3053 43 43 parent = waitForDeferred(request.locateResource(parentForURL(request.uri))) 44 44 yield parent 45 parent = parent.get Result()45 parent = parent.get_result() 46 46 47 47 if self.fp.exists(): … … 72 72 yield x 73 73 try: 74 x.get Result()74 x.get_result() 75 75 except ValueError, e: 76 76 log.err("Error while handling MKCOL body: %s" % (e,)) … … 79 79 response = waitForDeferred(mkcollection(self.fp)) 80 80 yield response 81 yield response.get Result()81 yield response.get_result() 82 82 83 83 http_MKCOL = deferredGenerator(http_MKCOL) ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/method/propfind.py
r2063 r3053 54 54 doc = waitForDeferred(davXMLFromStream(request.stream)) 55 55 yield doc 56 doc = doc.get Result()56 doc = doc.get_result() 57 57 except ValueError, e: 58 58 log.err("Error while handling PROPFIND body: %s" % (e,)) … … 108 108 resource_properties = waitForDeferred(resource.listProperties(request)) 109 109 yield resource_properties 110 resource_properties = resource_properties.get Result()110 resource_properties = resource_properties.get_result() 111 111 112 112 if search_properties is "names": … … 123 123 properties_to_enumerate = waitForDeferred(resource.listAllprop(request)) 124 124 yield properties_to_enumerate 125 properties_to_enumerate = properties_to_enumerate.get Result()125 properties_to_enumerate = properties_to_enumerate.get_result() 126 126 else: 127 127 properties_to_enumerate = search_properties … … 132 132 resource_property = waitForDeferred(resource.readProperty(property, request)) 133 133 yield resource_property 134 resource_property = resource_property.get Result()134 resource_property = resource_property.get_result() 135 135 except: 136 136 f = Failure() ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/method/proppatch.py
r2063 r3053 53 53 doc = waitForDeferred(davXMLFromStream(request.stream)) 54 54 yield doc 55 doc = doc.get Result()55 doc = doc.get_result() 56 56 except ValueError, e: 57 57 log.err("Error while handling PROPPATCH body: %s" % (e,)) … … 97 97 has = waitForDeferred(self.hasProperty(property, request)) 98 98 yield has 99 has = has.get Result()99 has = has.get_result() 100 100 101 101 if has: 102 102 oldProperty = waitForDeferred(self.readProperty(property, request)) 103 103 yield oldProperty 104 oldProperty.get Result()104 oldProperty.get_result() 105 105 106 106 def undo(): … … 113 113 x = waitForDeferred(action(property, request)) 114 114 yield x 115 x.get Result()115 x.get_result() 116 116 except ValueError, e: 117 117 # Convert ValueError exception into HTTPError … … 141 141 ok = waitForDeferred(do(self.writeProperty, property)) 142 142 yield ok 143 ok = ok.get Result()143 ok = ok.get_result() 144 144 if not ok: 145 145 gotError = True … … 148 148 ok = waitForDeferred(do(self.removeProperty, property)) 149 149 yield ok 150 ok = ok.get Result()150 ok = ok.get_result() 151 151 if not ok: 152 152 gotError = True … … 164 164 x = waitForDeferred(action()) 165 165 yield x 166 x.get Result()166 x.get_result() 167 167 raise 168 168 … … 175 175 x = waitForDeferred(action()) 176 176 yield x 177 x.get Result()177 x.get_result() 178 178 responses.error() 179 179 ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/method/report.py
r2063 r3053 54 54 doc = waitForDeferred(davXMLFromStream(request.stream)) 55 55 yield doc 56 doc = doc.get Result()56 doc = doc.get_result() 57 57 except ValueError, e: 58 58 log.err("Error while handling REPORT body: %s" % (e,)) ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/method/report_expand.py
r2063 r3053 62 62 all_properties = waitForDeferred(self.listAllProp(request)) 63 63 yield all_properties 64 all_properties = all_properties.get Result()64 all_properties = all_properties.get_result() 65 65 66 66 for all_property in all_properties: … … 80 80 my_properties = waitForDeferred(self.listProperties(request)) 81 81 yield my_properties 82 my_properties = my_properties.get Result()82 my_properties = my_properties.get_result() 83 83 84 84 if property in my_properties: … … 86 86 value = waitForDeferred(self.readProperty(property, request)) 87 87 yield value 88 value = value.get Result()88 value = value.get_result() 89 89 90 90 if isinstance(value, davxml.HRef): ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/fileupload.py
r2063 r3053 51 51 line = defer.waitForDeferred(line) 52 52 yield line 53 line = line.get Result()53 line = line.get_result() 54 54 #print "GOT", line 55 55 if not line.endswith('\r\n'): … … 177 177 line = defer.waitForDeferred(line) 178 178 yield line 179 line = line.get Result()179 line = line.get_result() 180 180 if line != self.boundary + '\r\n': 181 181 raise MimeFormatError("Extra data before first boundary: %r looking for: %r" % (line, self.boundary + '\r\n')) … … 192 192 line = defer.waitForDeferred(line) 193 193 yield line 194 line = line.get Result()194 line = line.get_result() 195 195 196 196 if line == "--\r\n": … … 255 255 datas = defer.waitForDeferred(datas) 256 256 yield datas 257 datas = datas.get Result()257 datas = datas.get_result() 258 258 if datas is None: 259 259 break … … 276 276 x = defer.waitForDeferred(x) 277 277 yield x 278 x = x.get Result()278 x = x.get_result() 279 279 if filename is None: 280 280 # Is a normal form field … … 345 345 datas = defer.waitForDeferred(datas) 346 346 yield datas 347 datas = datas.get Result()347 datas = datas.get_result() 348 348 if datas is None: 349 349 break ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/stream.py
r2063
