Vega strike Python Modules doc
0.5.1
Documentation of the " Modules " folder of Vega strike
|
Data Structures | |
class | Error |
class | error_reply |
class | error_temp |
class | error_perm |
class | error_proto |
class | FTP |
class | Netrc |
Functions | |
def | parse150 |
def | parse227 |
def | parse229 |
def | parse257 |
def | print_line |
def | ftpcp |
def | test |
Variables | |
list | __all__ = ["FTP","Netrc"] |
int | MSG_OOB = 0x1 |
int | FTP_PORT = 21 |
tuple | all_errors = (Error, socket.error, IOError, EOFError) |
string | CRLF = '\r\n' |
_150_re = None | |
_227_re = None | |
An FTP client class and some helper functions. Based on RFC 959: File Transfer Protocol (FTP), by J. Postel and J. Reynolds Example: >>> from ftplib import FTP >>> ftp = FTP('ftp.python.org') # connect to host, default port >>> ftp.login() # default, i.e.: user anonymous, passwd user@hostname '230 Guest login ok, access restrictions apply.' >>> ftp.retrlines('LIST') # list directory contents total 9 drwxr-xr-x 8 root wheel 1024 Jan 3 1994 . drwxr-xr-x 8 root wheel 1024 Jan 3 1994 .. drwxr-xr-x 2 root wheel 1024 Jan 3 1994 bin drwxr-xr-x 2 root wheel 1024 Jan 3 1994 etc d-wxrwxr-x 2 ftp wheel 1024 Sep 5 13:43 incoming drwxr-xr-x 2 root wheel 1024 Nov 17 1993 lib drwxr-xr-x 6 1094 wheel 1024 Sep 13 19:07 pub drwxr-xr-x 3 root wheel 1024 Jan 3 1994 usr -rw-r--r-- 1 root root 312 Aug 1 1994 welcome.msg '226 Transfer complete.' >>> ftp.quit() '221 Goodbye.' >>> A nice test that reveals some of the network dialogue would be: python ftplib.py -d localhost -l -p -l
def ftplib.ftpcp | ( | source, | |
sourcename, | |||
target, | |||
targetname = '' , |
|||
type = 'I' |
|||
) |
Copy file from one FTP-instance to another.
Definition at line 636 of file ftplib.py.
References parse227().
def ftplib.parse227 | ( | resp) |
Parse the '227' response for a PASV request. Raises error_proto if it does not contain '(h1,h2,h3,h4,p1,p2)' Return ('host.addr.as.numbers', port#) tuple.
Definition at line 566 of file ftplib.py.
References dospath.join().
def ftplib.parse229 | ( | resp, | |
peer | |||
) |
Parse the '229' response for a EPSV request. Raises error_proto if it does not contain '(|||port|)' Return ('host.addr.as.numbers', port#) tuple.
Definition at line 586 of file ftplib.py.
References string.atoi(), string.find(), and string.split().
def ftplib.parse257 | ( | resp) |
def ftplib.print_line | ( | line) |
def ftplib.test | ( | ) |
tuple all_errors = (Error, socket.error, IOError, EOFError) |