PyXMMS, a Python interface to XMMS

Florent Rougon flo.please.no.spam@via.ecp.fr
Tue, 11 Nov 2003 19:32:55 +0100


Hello,


What is PyXMMS?
---------------

PyXMMS is a Python interface to XMMS, a multimedia player written for
the X Window System. PyXMMS can be used to control XMMS or manage its
main configuration file from a program written in Python.


What are the News?
------------------

I released PyXMMS 2, which contains a new component allowing to manage
the XMMS main configuration file. xmms is now a Python package, with
xmms.control providing the features found in PyXMMS 1.07 and xmms.config
providing the new features (however, I promise that code using the old
namespace won't break before at least 2005).


Examples
--------

1) You can tell the XMMS session 2 to start playing with:

     import xmms.control
     xmms.control.play(2)

2) You can write the following call:

     import xmms.control as xc
     xc.enqueue_and_play_launch_if_session_not_started(
                         ("file1.mp3", "file2.ogg", "http://u.r.l.ogg"),
                         "xmms", 0)
   to:

     - look if the XMMS session 0 is running and launch XMMS in
       the background if not (by the way, the two last arguments are
       optional and could be ommitted here);
     - add the three audio streams specified to the playlist;
     - tell the XMMS session 0 to start playing from file1.mp3.

3) You can play with the XMMS main configuration file:

     import xmms.config

     # Get the configuration from the default file
     # (usually ~/.xmms/config, but only libxmms really knows ;-)
     c = xmms.config.Config(fromfile="")
     # Extract the value associated to the "device" key in section "CDDA"
     print c["CDDA"]["device"]             # Prints e.g. '/dev/cdrom'
     # Alter this setting
     c["CDDA"]["device"] = "/dev/cdrecorder"
     # Write the new configuration to a file
     c.write_to_file("/path/to/file")
     # Write it to the default file (don't do this at home, kids!)
     c.write_to_file()


Documentation
--------------

PyXMMS is well documented. You can browse its documentation at:

  <http://people.via.ecp.fr/~flo/2002/PyXMMS/doc/xmms.html>

or with pydoc during interactive sessions, for instance.


License
-------

PyXMMS is licensed under the GNU GPL.


Requirements
------------

PyXMMS has been tested with Python 2.1, 2.2 and 2.3 (xmms.control might
work with earlier versions). The new component (XMMS configuration file
management) is only available for Python 2.2 and greater.


Home Page
---------

You will find everything about PyXMMS on:

  <http://people.via.ecp.fr/~flo/index.en.xhtml#PyXMMS>


And PyXMMS-remote?
------------------

PyXMMS-remote is a companion program of PyXMMS. It exports the features
provided in xmms.control to your shell's command line (or a program...).
For instance, the same effect as in example 2 above can be achived with:

  pyxmms-remote E file1.mp3 file2.ogg http://u.r.l.ogg

PyXMMS-remote can be found alongside with PyXMMS, at:

  <http://people.via.ecp.fr/~flo/index.en.xhtml#PyXMMS-remote>


Thanks for reading, and have fun.

-- 
Florent