Re: [Twisted-Python] How to get callback return value

2013-12-03 Thread Peter Westlake
On Tue, Dec 3, 2013, at 12:00, 杨有秀 wrote: > def loadConfig(self, id, config = None): > """ Load the config > """ > > platform = node.get_platform() > self.textLabel_Platform.setText(platform) > > > /home/20131203-Client/src/node.py > > def get_platform(self): >

Re: [Twisted-Python] How to get callback return value

2013-12-03 Thread Daniel Sank
this is not a complete working example. There's no executable code, and what you included doesn't make sense. When people ask for a complete working example it means that they want to try to run the same program that you're running. Just attach your actual source files to an email and send them.

Re: [Twisted-Python] How to get callback return value

2013-12-03 Thread 杨有秀
Thanks very much. Following is the traceback message and source code. => Traceback (most recent call last): File "/home/20131203-Client/src/NodeConfigurator.py", line 250, in __slotSelectionChanged self.__showConfigurationPage(last_item, 0) File "/home/20131203-Client/src/NodeConfigurator

Re: [Twisted-Python] How to get callback return value

2013-12-03 Thread Daniel Sank
The code you included in your email doesn't make sense. Please include a full working (with errors) code sample and then people can help you. Also, I _highly_ recommend that you read this: http://krondo.com/?page_id=1327 It might as well be considered the official n00b intro to Twisted, imho. _

[Twisted-Python] How to get callback return value

2013-12-03 Thread yangyouxiu
Hi,all! On call main method, it call self.getName() in A.py, as I use callback, I can not get the return value correctly, I thought it's because the Asynchronous attribute, how should i do? B.py main: name=self.getName() A.py def getname(): def.callback(method1) def.callback(method2) def.call