#NEWLINE# def _send_open( self , virtual_host , capabilities = '' ) : #NEWLINE# #INDENT# 'Open connection to virtual host\n\n        This method opens a connection to a virtual host, which is a collection of resources, and\n        acts to separate multiple application domains within a server. RULE: The client MUST open\n        the context before doing any work on the connection.\n\n        :param virtual_host: virtual host path\n        :param capabilities: required capabilities\n        :type virtual_host: str\n        :type capabilities: str\n        ' #NEWLINE# args = AMQPWriter ( ) #NEWLINE# args . write_shortstr ( virtual_host ) #NEWLINE# args . write_shortstr ( self ) #NEWLINE# args . write_bit ( False ) #NEWLINE# self . _send_method ( Method ( spec . Connection . Open , args ) ) #NEWLINE# return self . wait ( spec . Connection . OpenOk )