X-Git-Url: https://git.kaliko.me/?p=python-musicpd.git;a=blobdiff_plain;f=doc%2Fsource%2Fexamples%2Fplayback.py;fp=doc%2Fsource%2Fexamples%2Fplayback.py;h=ce7eb78e7abfef5624eb84c3fa92b79f6997b50c;hp=0000000000000000000000000000000000000000;hb=c7b2fbbb9689a180f220322b21e2b0bef798eb68;hpb=43a63d085fab34f337ceec232e29e5760f4fcc25 diff --git a/doc/source/examples/playback.py b/doc/source/examples/playback.py new file mode 100644 index 0000000..ce7eb78 --- /dev/null +++ b/doc/source/examples/playback.py @@ -0,0 +1,7 @@ +import musicpd + +# Using a context manager +# (use env var if you need to override default host) +with musicpd.MPDClient() as client: + client.play() + client.setvol('80')