rsmills36 / pyftpdlib

Automatically exported from code.google.com/p/pyftpdlib
Other
0 stars 0 forks source link

[doc] add documentation of FTPServer constructor to help(pyftpdlib) #290

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
help(pyftpdlib) doesn't contain any information about the handling of address 
parameter passed to the constructor, futhermore I experienced the following 
inconsistence between my version 1.2.0 (running on Ubuntu 14.04 with both 
python 2.7.6 and 3.4.0) and the wiki:
<code>
python -m pyftpdlib -i 127.0.0.1 -p 8021
</code>
returns
<output>
[I 14-05-11 01:31:48] >>> starting FTP server on 127.0.0.1:8021, pid=21752 <<<
[I 14-05-11 01:31:48] poller: <class 'pyftpdlib.ioloop.Epoll'>
[I 14-05-11 01:31:48] masquerade (NAT) address: None
[I 14-05-11 01:31:48] passive ports: None
[I 14-05-11 01:31:48] use sendfile(2): True
</output>
instead of 
<output>
[I 13-02-20 14:16:36] >>> starting FTP server on 0.0.0.0:21 <<<
[I 13-02-20 14:16:36] poller: <class 'pyftpdlib.ioloop.Epoll'>
[I 13-02-20 14:16:36] masquerade (NAT) address: None
[I 13-02-20 14:16:36] passive ports: None
[I 13-02-20 14:16:36] use sendfile(2): True
</output>
as shown in the wiki https://code.google.com/p/pyftpdlib/wiki/FAQ. 

Besides a general need for this improvement of the docs, I need clearification 
in order to investigate further and file a bug report if necessary.

Original issue reported on code.google.com by karl.ric...@gmail.com on 10 May 2014 at 11:40

GoogleCodeExporter commented 9 years ago
port in the second output should be 8021 instead of 21 (can't edit :( )

Original comment by karl.ric...@gmail.com on 10 May 2014 at 11:42

GoogleCodeExporter commented 9 years ago
> help(pyftpdlib) doesn't contain any information about the handling of address 
parameter passed to the constructor, 

What do you mean? The "address" parameter is already explained in the doc. 
help(pyftpdlib) is not meant to provide an extended set of information, just a 
brief description of the lib and a quick & dirty example usage.

As for the "port 8021" issue: I just edited the doc (thanks for signaling).

Original comment by g.rodola on 12 May 2014 at 7:12

GoogleCodeExporter commented 9 years ago
It is not clear whether the address is the address where pyftpdlib listens (I 
assumed this from 0.0.0.0) or the address where the socket is created.

Original comment by karl.ric...@gmail.com on 15 May 2014 at 6:21

GoogleCodeExporter commented 9 years ago
> [...] or the address where the socket is created.

This doesn't make sense.
The ip:port pair is the address where the socket *listens*, and it should be 
clear if you're used to network/socket programming.

Original comment by g.rodola on 15 May 2014 at 6:48