def __init__(self, nick, host='localhost', port=6667, user=DEFAULT_USER, name=DEFAULT_REAL_NAME, password=None, **kw): self.nick = nick self.user = user self.name = name self.host = host self.logged_in = False self.password = password Client.__init__(self, host, port, **kw)
def __init__(self, host='localhost', port=5432, user='******', database='template1', **kw): self.in_query = False self.user = user self.database = database self.params = {} self.cancel_secret = None self.process_id = None self.state = None self.prepare_gen = itertools.count(0) self.prepared = {} Client.__init__(self, host, port, **kw)
def __init__(self, host='', port=SMTP_PORT, local_hostname=None, timeout=None, **kw): """Initialize a new instance. If specified, `host' is the name of the remote host to which to connect. If specified, `port' specifies the port to which to connect. By default, smtplib.SMTP_PORT is used. An SMTPConnectError is raised if the specified `host' doesn't respond correctly. If specified, `local_hostname` is used as the FQDN of the local host. By default, the local hostname is found using socket.getfqdn(). """ Client.__init__(self, host, port, timeout=timeout, **kw) self.esmtp_features = {} if host: (code, msg) = self.connect(host, port) if code != 220: raise SMTPConnectError(code, msg) if local_hostname is not None: self.local_hostname = local_hostname else: # RFC 2821 says we should use the fqdn in the EHLO/HELO verb, and # if that can't be calculated, that we should use a domain literal # instead (essentially an encoded IP address like [A.B.C.D]). fqdn = socket.getfqdn() if '.' in fqdn: self.local_hostname = fqdn else: # We can't find an fqdn hostname, so use a domain literal addr = '127.0.0.1' try: addr = socket.gethostbyname(socket.gethostname()) except socket.gaierror: pass self.local_hostname = '[%s]' % addr
def close(self): if not self.is_closed: send('X' + pack('!i', 4)) Client.close(self)
def __init__(self, *args, **kw): Client.__init__(self, *args, **kw) self.input = Queue()
def __init__(self, *args, **params): Client.__init__(self, *args, **params) self._msg_id_counter = itertools.count(1)
def __init__(self, host="localhost", port=PGSQL_PORT, **kw): Client.__init__(self, host, port, **kw)
def __init__(self, host='localhost', port=MEMCACHE_PORT, password=None, **kw): self.password = password Client.__init__(self, host, port, **kw)
def __init__(self, host='localhost', port=27017, **kw): Client.__init__(self, host, port, **kw) self._msg_id_counter = itertools.count(1)
def __init__(self, host='localhost', port=REDIS_PORT, password=None, **kw): self.password = password Client.__init__(self, host, port, **kw)
def __init__(self, host='localhost', port=REDIS_PORT, **kw): Client.__init__(self, host, port, **kw)