call site 11 for execnet.Channel.setcallback
execnet/testing/test_gateway.py - line 308
303
304
305
306
307
308
309
310
311
312
313
314
315
316
   def test_remote_exec_redirect_multi(self): 
       num = 3
       l = [[] for x in range(num)]
       channels = [self.gw.remote_exec("print %d" % i, 
                                       stdout=l[i].append)
->                     for i in range(num)]
       for x in channels: 
           x.waitclose(TESTTIMEOUT) 
   
       for i in range(num): 
           subl = l[i] 
           assert subl 
           s = subl[0]
           assert s.strip() == str(i)
execnet/gateway.py - line 286
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
   def remote_exec(self, source, stdout=None, stderr=None): 
       """ return channel object and connect it to a remote
               execution thread where the given 'source' executes
               and has the sister 'channel' object in its global 
               namespace.  The callback functions 'stdout' and 
               'stderr' get called on receival of remote 
               stdout/stderr output strings. 
           """
       try:
           source = str(Source(source))
       except NameError: 
           try: 
               import py 
               source = str(py.code.Source(source))
           except ImportError: 
               pass 
       channel = self.newchannel() 
->     outid = self._newredirectchannelid(stdout) 
       errid = self._newredirectchannelid(stderr) 
       self._send(Message.CHANNEL_OPEN(
                   channel.id, (source, outid, errid)))
       return channel 
execnet/gateway.py - line 257
250
251
252
253
254
255
256
257
258
   def _newredirectchannelid(self, callback): 
       if callback is None: 
           return  
       if hasattr(callback, 'write'): 
           callback = callback.write 
       assert callable(callback) 
       chan = self.newchannel()
->     chan.setcallback(callback)
       return chan.id