Click to See Complete Forum and Search --> : pexpect vs. command


Dun'kalis
12-03-2002, 11:05 PM
I'm working on a general purpose music/media program in Python that can play MP3, Ogg, WAV, CDs, etc. I have most of the stuff implemented, but I need to make a decision. There are no Python bindings for any MP3 or Ogg libraries. So, I have to use external programs to do this. I'm going to use madplay for the player, but I need to decide whether I can use command or pexpect. Portability is not a concern (its being coded with KDE), so I could use the built-in command function, or I could use pexpect. Madplay has the capability to pause and such in the middle of operation, so thats why I'm using it. Now, can I send commands to the madplay program using the easier command function, or do I have to use pexpect? Another question: If I'm using Qt/KDE, could the user continue doing other things in the program while madplay is doing its thing?

If not, I'll have to write bindings for either splay or libmad, and thats not fun...