ian luddy
unread,Jan 9, 2012, 1:01:52 PM1/9/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Python FTP server library - Discussion group
Hi,
I'm trying to run a pyftpdlib FTP Server as a Cherrpy plugin. I have
specified a class which extends the Cherrypy SimplePlugin class and is
instantiated like this:
CoreFTPServer(bus = cherrypy.engine, addr, port, root, user,
password).subscribe()
In the CoreFTPServer class I start the FTP Server in a new thread like
this (I have increased the timeout and set Polling to True but this
hasn't solved the issue):
threading.Thread(target = self.ftpd.serve_forever , args = (10.0 ,
True))
The FTP Server runs fine but eventually runs into the following issue:
Traceback (most recent call last):
File "C:\Python26\lib\asynchat.py", line 110, in handle_read
data = self.recv (self.ac_in_buffer_size)
File "C:\Python26\Lib\asyncore.py", line 362, in recv
data = self.socket.recv(buffer_size)
error: [Errno 10035] A non-blocking socket operation could not be
completed immediately
Is there a way to set the FTP Server so that it's using a blocking
socket? Or is there a better solution? I am a relatively inexperienced
programmer and any help would be appreciated.
Cheers