#NEWLINE# def Dial( proto , * args ) : #NEWLINE# #INDENT# ' A Dial is a generic client for stream-oriented protocols.\n\n    Example::\n\n        conn, err = Dial("tcp", (\'127.0.0.1\', 8000))\n        conn.write("hello")\n        print(conn.read())\n    ' #NEWLINE# try : #NEWLINE# #INDENT# dial_func = DIAL_HANDLERS [ proto ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# raise ValueError ( 'type should be tcp, udp or unix' ) #NEWLINE# #UNINDENT# return dial_func ( * args )