parsePBConnectionInfo(string,
username=' user ' ,
password=' test ' ,
port=7531,
use_ssl=True)
| source code
|
Parse a string representation of a PB connection into a
PBConnectionInfo object.
The expected format is [user[:pass]@]host[:port]. Only the host is
mandatory. The default values for username, password, and port will be
taken from the optional username, password and port arguments.
- Parameters:
string (str) - A string describing the PB connection.
username (str) - Default username, or 'user' if not given.
password (str) - Default password, or 'test' if not given.
port (int) - Default port, or 7531 if not given.
use_ssl (bool) - Whether to use SSL, or True if not given. Note that there is no
syntax in the connection string for specifying whether or not to
use SSL; if you want to control this you will have to provide
another method.
- Returns: PBConnectionInfo
|