[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

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. _

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/2

[Twisted-Python] Unit testing AMP responder method registration

2013-12-03 Thread Laurens Van Houtven
Hi! I'm trying to write code using TDD and AMP. I'm trying to figure out how to write a unit test for: @MyCommand.responder Specifically, I would assume that test: 1. Tests that the responder locator has a responder for MyCommand; 2. That responder matches the decorated method (1) is easy, (2)

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 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) > > > /ho

[Twisted-Python] website login not working?

2013-12-03 Thread Daniel Sank
I just tried logging into the website to place some tickets and found that my login doesn't work. I got a password reset but still no dice. Anyone else having this problem? -- Daniel Sank Department of Physics Broida Hall University of California Santa Barbara, CA 93117 (805)893-3899 ___