pyxmms trouble

David Smith dsmith at programmablesolutions.net
Tue May 4 16:27:32 EDT 2004


Hi:
    I am a newbie to python and in general programming. My problem is
that I am trying to use the pyxmms remote to add songs to the xmms
playlist. However, no matter whether I open the interpreter or put it in
a file and run the script the output is the same. It just sits there
with no error msg of any kind and doesn't add the file to the playlist.
I then have to ctrl-c to break it and alot of times this makes the
keyboard stop working and I have to restart X to get it working again. 
    Here is the I'm using code:
import os
import xmms.control
import time
import wx

#Start xmms
os.popen2('/usr/bin/xmms')
time.sleep(5)

print xmms.control.is_main_win(0)
if xmms.control.is_main_win(0) == 1:
	xmms.control.main_win_toggle(0)

print xmms.control.is_eq_win(0)
if xmms.control.is_eq_win(0) == 1:
    xmms.control.eq_win_toggle(0)

xmms.control.playlist_clear(0)

seq = "/home/eomer/tumes.m3u"
xmms.control.playlist_add_allow_relative(seq, 0)
xmms.control.play(0)

Under the interpretor I do access it differently (and I opened xmms
myself):
import xmms.control
xmms.control.playlist_add('/home/eomer/tumes.m3u', 0)

	I have used both of these functions both ways. Both produce the same
result. The playlist_clear function works perfectly. Also I have tried
other files that aren't actually m3u lists. All have the same effects.
	I am running Xmms 1.2.10 (just in case you need to know :D). Oh also if
you know a better way to open xmms from the script and allow the script
to still run please feel free to comment. 
Oh, this is just an experiment not life or death (yet :)).

Thanks,
David

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/python-list/attachments/20040504/00772a8c/attachment.sig>


More information about the Python-list mailing list