def setup_domain_socket(location):

    '''
        Setup Domain Socket

        Setup a connection to a Unix Domain Socket

        --
        @param  location:str    The path to the Unix Domain Socket to connect to.
        @return <class 'socket._socketobject'>
    '''

    clientsocket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
    clientsocket.settimeout(timeout)
    clientsocket.connect(location)

    return clientsocket
def setup_domain_socket ( location ) : clientsocket = socket . socket ( socket . AF_UNIX , socket . SOCK_STREAM ) clientsocket . settimeout ( timeout ) clientsocket . connect ( location ) return clientsocket
Setup Domain Socket

        Setup a connection to a Unix Domain Socket

        --
        @param  location:str    The path to the Unix Domain Socket to connect to.
        @return <class 'socket._socketobject'>