Home ⌂Doc Index ◂Up ▴

eric6.E5Network.E5Ftp

Module implementing an extension to the Python FTP class to support FTP proxies.

Global Attributes

None

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

None


E5Ftp

Class implementing an extension to the Python FTP class to support FTP proxies.

Derived from

ftplib.FTP

Class Attributes

None

Class Methods

None

Methods

E5Ftp Constructor
connect Public method to connect to the given FTP server.
login
setProxy Public method to set the proxy configuration.
setProxyAuthentication Public method to set the proxy authentication info.

Static Methods

None

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)
Up


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:

Derived from

ftplib.Error

Class Attributes

None

Class Methods

None

Methods

None

Static Methods

None
Up


E5FtpProxyType

Class defining the supported FTP proxy types.

Derived from

object

Class Attributes

AuthResp
Bluecoat
NoProxy
NonAuthorizing
Open
ProxyuserAtServer
Site
UserAtProxyuserAtServer
UserAtServer

Class Methods

None

Methods

None

Static Methods

None
Up



Home ⌂Doc Index ◂Up ▴