eric6.E5Network.E5Ftp
Module implementing an extension to the Python FTP class to support FTP
proxies.
Global Attributes
Classes
E5Ftp |
Class implementing an extension to the Python FTP class to support FTP proxies. |
E5FtpProxyError |
Class to signal an error related to proxy configuration. |
E5FtpProxyType |
Class defining the supported FTP proxy types. |
Functions
E5Ftp
Class implementing an extension to the Python FTP class to support FTP
proxies.
Derived from
ftplib.FTP
Class Attributes
Class Methods
Methods
Static Methods
E5Ftp (Constructor)
E5Ftp(host="", user="", password="", acct="", proxyType=E5FtpProxyType.NoProxy, proxyHost="", proxyPort=ftplib.FTP_PORT, proxyUser="", proxyPassword="", proxyAccount="", timeout=_GLOBAL_DEFAULT_TIMEOUT)
Constructor
- host
-
name of the FTP host (string)
- user
-
user name for login to FTP host (string)
- password
-
password for login to FTP host (string)
- acct
-
account for login to FTP host (string)
- proxyType
-
type of the FTP proxy (integer 0 to 8)
- proxyHost
-
name of the FTP proxy (string)
- proxyPort
-
port of the FTP proxy (integer)
- proxyUser
-
user name for login to the proxy (string)
- proxyPassword
-
password for login to the proxy (string)
- proxyAccount
-
accounting info for the proxy (string)
- timeout
-
timeout in seconds for blocking operations (integer)
E5Ftp.connect
connect(host="", port=0, timeout=-999)
Public method to connect to the given FTP server.
This extended method connects to the proxy instead of the given host,
if a proxy is to be used. It throws an exception, if the proxy data
is incomplete.
- host
-
name of the FTP host (string)
- port
-
port of the FTP host (integer)
- timeout
-
timeout in seconds for blocking operations (integer)
- Returns:
-
welcome message of the server (string)
- Raises E5FtpProxyError:
-
raised to indicate a proxy related issue
E5Ftp.login
login(user="", password="", acct="")
E5Ftp.setProxy
setProxy(proxyType=E5FtpProxyType.NoProxy, proxyHost="", proxyPort=ftplib.FTP_PORT, proxyUser="", proxyPassword="", proxyAccount="")
Public method to set the proxy configuration.
- proxyType
-
type of the FTP proxy (integer 0 to 8)
- proxyHost
-
name of the FTP proxy (string)
- proxyPort
-
port of the FTP proxy (integer)
- proxyUser
-
user name for login to the proxy (string)
- proxyPassword
-
password for login to the proxy (string)
- proxyAccount
-
accounting info for the proxy (string)
E5Ftp.setProxyAuthentication
setProxyAuthentication(proxyUser="", proxyPassword="", proxyAccount="")
Public method to set the proxy authentication info.
- proxyUser
-
user name for login to the proxy (string)
- proxyPassword
-
password for login to the proxy (string)
- proxyAccount
-
accounting info for the proxy (string)
E5FtpProxyError
Class to signal an error related to proxy configuration.
The error message starts with a three digit error code followed by a
space and the error string. Supported error codes are:
- 910: proxy error; the second number gives the category of the proxy
error. The original response from the proxy is appended in the next
line.
- 930: proxy error; the second number gives the category of the proxy
error. The original response from the proxy is appended in the next
line.
- 940: proxy error; the second number gives the category of the proxy
error. The original response from the proxy is appended in the next
line.
- 950: proxy error; the second number gives the category of the proxy
error. The original response from the proxy is appended in the next
line.
- 990: proxy usage is enabled but no proxy host given
- 991: proxy usage is enabled but no proxy user given
- 992: proxy usage is enabled but no proxy password given
Derived from
ftplib.Error
Class Attributes
Class Methods
Methods
Static Methods
E5FtpProxyType
Class defining the supported FTP proxy types.
Derived from
object
Class Attributes
AuthResp |
Bluecoat |
NoProxy |
NonAuthorizing |
Open |
ProxyuserAtServer |
Site |
UserAtProxyuserAtServer |
UserAtServer |
Class Methods
Methods
Static Methods