[Pkg-mpd-commits] [python-mpd] 194/262: README.md: better ranges example
Simon McVittie
smcv at debian.org
Sun May 22 18:16:46 UTC 2016
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch upstream
in repository python-mpd.
commit 659b23bfaed954d61a05bd292d4dbd6c8a6197ad
Author: Jörg Thalheim <joerg at higgsboson.tk>
Date: Mon Feb 18 23:33:49 2013 +0100
README.md: better ranges example
---
README.rst | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/README.rst b/README.rst
index 2ffe8e9..26aa58d 100644
--- a/README.rst
+++ b/README.rst
@@ -167,13 +167,23 @@ Range
Some commands support integer ranges as argument. This is done in python-mpd2
by using two element tuple::
- # move the first and the second songs
- # after the third in the playlist
- >>> client.move((1:2), 3)
+ # move the first three songs
+ # after the last in the playlist
+ >>> client.status()
+ ['file: song1.mp3',
+ 'file: song2.mp3',
+ 'file: song3.mp3',
+ 'file: song4.mp3']
+ >>> client.move((0:3), 1)
+ >>> client.status()
+ ['file: song4.mp3'
+ 'file: song1.mp3',
+ 'file: song2.mp3',
+ 'file: song3.mp3',]
Second element can be omitted. MPD will assumes the biggest possible number then (don't forget the comma!)::
- >>> client.delete((2,)) # delete all songs, but the first.
+ >>> client.delete((1,)) # delete all songs, but the first.
Unicode Handling
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mpd/python-mpd.git
More information about the Pkg-mpd-commits
mailing list