Terry Reedy wrote: >"Ognjen Bezanov" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] > > >>I need to find a way to 'fork' a function into the background yet still >>be able to send commands to it. >> >> > >Others gave you the answer to this.. > > > >>I am writing a media player, and I have a function which plays the >>media. I want to be able to run this function but to (at the same time) >>be able to send commands from it (e.g. pause, play etc...) >> >> > >But for this, you might look into PyGame, which, I believe, has functions >like this. > >Terry J. Reedy > > > > > I had a look into this, but have decided on pymedia, which was more focused on well... media.
Either way thanks all of you, I have written my first threaded program, and it does what I need it to perfectly. The only thing i have a problem with now is how to communicate with the thread, I need to send commands such as "play","pause" and the like to it. someone here mentioned queues, but searching the python documentation only have me a description of the queue object. Is there anywhere where I can find out about queues, for people who know python but have not had a lot of experience with threaded programs? Cheers -- http://mail.python.org/mailman/listinfo/python-list