X-Git-Url: https://git.kaliko.me/?p=python-musicpd.git;a=blobdiff_plain;f=README.rst;h=95e6ff5b19fb653a57aa7636aa44bcaf145233dd;hp=61b305fec96b4ec1277c1bdd06ce4b266e5a0390;hb=1fb65355de64ef044d0a7b3736a21bed6a6ae290;hpb=646d270285ecdfa062e1961e116190e7ce5b7828 diff --git a/README.rst b/README.rst index 61b305f..95e6ff5 100644 --- a/README.rst +++ b/README.rst @@ -35,7 +35,10 @@ Using the client library The client library can be used as follows:: client = musicpd.MPDClient() # create client object - client.connect('localhost', 6600) # connect to localhost:6600 + client.connect() # use MPD_HOST/MPD_PORT if set else + # test ${XDG_RUNTIME_DIR}/mpd/socket for existence + # fallback to localhost:6600 + # `connect` support host/port argument as well print client.mpd_version # print the mpd version print client.cmd('one', 2) # print result of the command "cmd one 2" client.close() # send the close command