From 596cd501119c54094d5908360697a375d2df65d0 Mon Sep 17 00:00:00 2001 From: Roy Hyunjin Han Date: Thu, 9 Aug 2012 01:27:08 -0400 Subject: [PATCH] Updated README --- README.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 61579fc..37fee10 100644 --- a/README.rst +++ b/README.rst @@ -42,14 +42,15 @@ Installation Usage ----- ---- Activate isolated environment. + .. code-block:: bash VIRTUAL_ENV=$HOME/.virtualenv source $VIRTUAL_ENV/bin/activate Emit. + .. code-block:: python from socketIOClient import SocketIO @@ -58,6 +59,7 @@ Emit. socketIO.emit('aaa', {'bbb': 'ccc'}) Emit with callback. + .. code-block:: python from socketIOClient import SocketIO @@ -70,6 +72,7 @@ Emit with callback. socketIO.wait() Define events. + .. code-block:: python from socketIOClient import SocketIO @@ -81,6 +84,7 @@ Define events. socketIO.on('ddd', on_ddd) Define events in a namespace. + .. code-block:: python from socketIOClient import SocketIO, BaseNamespace @@ -93,6 +97,7 @@ Define events in a namespace. socketIO = SocketIO('localhost', 8000, Namespace) Define standard events. + .. code-block:: python from socketIOClient import SocketIO, BaseNamespace @@ -114,6 +119,7 @@ Define standard events. socketIO = SocketIO('localhost', 8000, Namespace) Define different behavior for different channels on a single socket. + .. code-block:: python mainSocket = SocketIO('localhost', 8000, MainNamespace())