Re: [Twisted-Python] Basic problem with deferreds

2011-08-22 Thread Michael Thompson
On 23 August 2011 04:52, wrote: > action and add the results to a list. No matter how I place the methods or > how I call them when > evaluating the user or the security code, I always get a Deferred object and > I need the actual result > so that the method continue to be executed or not, eva

[Twisted-Python] Basic problem with deferreds

2011-08-22 Thread mayvimmer
Hi guys, I'm new to twisted world and I'm facing what seems to be an easy problem but I cannot grasp it. I thought I have already undestood the deferred concept but obviously I still have a concept error I cannot pass: I have a method with the following parameters: 1- an userid, 2- a security

Re: [Twisted-Python] RPC design questions

2011-08-22 Thread Tristan Seligmann
On Mon, Aug 22, 2011 at 11:09 PM, Tobias Oberstein wrote: > self.call(, ) > self.call("square", 6).addCallback(self.call, "sqrt").addCallback(self.show) The easiest way to do this is probably: from functools import partial self.call("square", 6).addCallback(partial(self.call, "sqrt")).addCallbac

Re: [Twisted-Python] SFTP Server sample

2011-08-22 Thread Osborn Chan
Hi Michal, Thanks a lot! It is a very nice working example, and it is good for newbie as well. Regards, Osborn From: Michal Mach mailto:michal.m...@gmail.com>> Reply-To: Twisted general discussion mailto:twisted-python@twistedmatrix.com>> Date: Tue, 23 Aug 2011 00:31:00 +0200 To: Twisted gener

Re: [Twisted-Python] SFTP Server sample

2011-08-22 Thread Michal Mach
Not sure what you mean, but here is a basic example: from zope.interface import implements from twisted.application import service, internet from twisted.conch.ssh.keys import Key from twisted.conch.ssh.factory import SSHFactory from twisted.conch.unix import UnixSSHRealm from twisted.cred.checke

[Twisted-Python] RPC design questions

2011-08-22 Thread Tobias Oberstein
I'm currently making some light-weight RPC/PubSub over WebSockets using Twisted. I have two design-like questions where I'd be happy for advice/options ... The first is definitely Twisted related, the second not strictly, .. Tobias 1) I'd like to chain RPC calls, i.e. self.call(23, "square").

Re: [Twisted-Python] SFTP Server sample

2011-08-22 Thread Osborn Chan
Yes. It is SFTP, and I found that filetransfer.FileTransferServer is a subsystem under UnixConchUser. self.subsystemLookup.update({"sftp": filetransfer.FileTransferServer}) However, I was able to start a ssh shell by using SSHFactory and UnixSSHReam, but I was not able to start SFTP as su

Re: [Twisted-Python] SFTP Server sample

2011-08-22 Thread Laurens Van Houtven
Oops, pressed enter too soon: On Mon, Aug 22, 2011 at 10:17 PM, Laurens Van Houtven <_...@lvh.cc> wrote: > Yes. It implements SFTP pretty much the way ** the specification ** > documents SFTP. Unfortunately. > cheers lvh ___ Twisted-Python mailing lis

Re: [Twisted-Python] SFTP Server sample

2011-08-22 Thread Laurens Van Houtven
Yes. It implements SFTP pretty much the way documents SFTP. Unfortunately. Let's just say that SFTP is not the easiest of protocols when you just want something like os/shutil but remote-ier. cheers lvh ___ Twisted-Python mailing list Twisted-Python@twi

[Twisted-Python] Problem Reading a Directory with Conch/SFTP

2011-08-22 Thread Jeffrey Ollie
I'm re-writing a client that downloads some data from a 3rd party using SFTP. The old client was written using Paramiko but I'd like to rewrite it using Twisted and Conch. Right now I'm running into an issue trying to get a directory listing from the remote server: 2011-08-22 13:35:03-0500 [SSHC

Re: [Twisted-Python] SFTP Server sample

2011-08-22 Thread Jasper St. Pierre
What about twisted.conch.ssh.filetransfer? Is that not SFTP? On Mon, Aug 22, 2011 at 3:36 PM, Drew Smathers wrote: > On Fri, Aug 19, 2011 at 2:43 PM, Osborn Chan wrote: >> Hi, >> >> I am a newbie in twisted and python. >> I would like to create a python SFTP server with twisted, but I cannot fin

Re: [Twisted-Python] SFTP Server sample

2011-08-22 Thread Drew Smathers
On Fri, Aug 19, 2011 at 2:43 PM, Osborn Chan wrote: > Hi, > > I am a newbie in twisted and python. > I would like to create a python SFTP server with twisted, but I cannot find > any sample. > > Can someone give me some advise? > I don't believe there are any examples of building an SFTP server