def connect_port(address='127.0.0.1', port=9051, password=None, chroot_path=None, controller=stem.control.Controller):
 try:
  control_port = stem.socket.ControlPort(address, port)
 except stem.SocketError as exc:
  print exc
  return None
 return _connect_auth(control_port, password, True, chroot_path, controller)

def connect_port ( address = '127.0.0.1' , port = 9051 , password = None , chroot_path = None , controller = stem . control . Controller ) : try : control_port = stem . socket . ControlPort ( address , port ) except stem . SocketError as exc : print exc return None return _connect_auth ( control_port , password , True , chroot_path , controller )
convenience function for quickly getting a control connection .