From 8483e68f5ed17d015a2d06816be55eaa927ea796 Mon Sep 17 00:00:00 2001 From: Krzysztof Jagiello Date: Sat, 4 Jun 2011 20:30:46 +0200 Subject: [PATCH] nice code blocks --- README.rst | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/README.rst b/README.rst index 442dce5..b727919 100644 --- a/README.rst +++ b/README.rst @@ -12,9 +12,9 @@ Install Download the most recent sourcecode and install it: - git clone git://github.com/Balon/python-ts3.git - cd python-ts3 - python setup.py install # sudo this + git clone git://github.com/Balon/python-ts3.git + cd python-ts3 + python setup.py install # sudo this Example @@ -22,19 +22,19 @@ Example Example showing how to create a channel and sub-channel for it using python-ts3 library: - import ts3 + import ts3 - server = ts3.TS3Server('127.0.0.1', 10011) - server.login('serveradmin', 'secretpassword') - - # choose virtual server - server.use(1) + server = ts3.TS3Server('127.0.0.1', 10011) + server.login('serveradmin', 'secretpassword') - # create a channel - response = server.send_command('channelcreate', keys={'channel_name': 'Just some channel'}) - - # id of the newly created channel - channel_id = response.response['keys']['cid'] - - # create a channel - server.send_command('channelcreate', keys={'channel_name': 'Just some sub-channel', 'cpid': channel_id}) + # choose virtual server + server.use(1) + + # create a channel + response = server.send_command('channelcreate', keys={'channel_name': 'Just some channel'}) + + # id of the newly created channel + channel_id = response.response['keys']['cid'] + + # create a channel + server.send_command('channelcreate', keys={'channel_name': 'Just some sub-channel', 'cpid': channel_id})