Oh dear. For the time being I will leave it with fork and leave it at that.
Ta
sree
> You may be missing nothing. If I recall correctly a similar problem was
> once reported on the pygtk-list. Some investigation showed that some
> programs couldn't be reliably run from a thread, using os.system.
On 2006-07-10, sreekant <[EMAIL PROTECTED]> wrote:
> Hi folks
>
> What am I doing wrong in the following? I just want to run fluidsynth in
> the background.
> #
> class MyThread(threading.Thread):
> def __init__(self, cmd, callback):
> self.__c
Piet van Oostrum wrote:
>> sreekant <[EMAIL PROTECTED]> (S) wrote:
>
>> S> I decided in the end to use fork and all is well.
>
> But how are you doing the callback then? From your code it looks like the
> callback is called after the external command finishes. The callback would
> then be cal
> sreekant <[EMAIL PROTECTED]> (S) wrote:
>S> I decided in the end to use fork and all is well.
But how are you doing the callback then? From your code it looks like the
callback is called after the external command finishes. The callback would
then be called in the child process, not in the
I decided in the end to use fork and all is well.
Thanks
sree
--
http://mail.python.org/mailman/listinfo/python-list
> sreekant <[EMAIL PROTECTED]> (S) wrote:
>S> Hi folks
>S> What am I doing wrong in the following? I just want to run fluidsynth in
>S> the background.
>S> #
>S> class MyThread(threading.Thread):
>S> def __init__(self, cmd, callback):
>S> sel
sreekant wrote:
> Hi folks
>
> What am I doing wrong in the following? I just want to run fluidsynth in
> the background.
Others have pointed you at os.popen. In non-crippled languages, use
processes (e.g. popen) when you wish to preserve the years of hard work
that OS designers put into protecte
Hi there
I tried as advised. Now the function gets called only after I hit quit
button which calls gtk.main_quit() at which point, the ui stays on but
not responsive, while the fluidsynth runs in the fg, then ui disappears
as the fluidsynth finishes and presumably the thread dies.
xc = thread
you don't need twisted to run processes in the background, either.
os.popen* returns a file or set of files representing std streams
immediately
subprocess.Popen is a spiffy little object new in 2.4 and available for
download for 2.3. check the module docstrings for usage tips.
you can use threads
On Mon, 10 Jul 2006 11:29:37 +, sreekant <[EMAIL PROTECTED]> wrote:
>Hi folks
>
>What am I doing wrong in the following? I just want to run fluidsynth in
>the background.
>#
>class MyThread(threading.Thread):
> def __init__(self, cmd, callback):
>
Hi folks
What am I doing wrong in the following? I just want to run fluidsynth in
the background.
#
class MyThread(threading.Thread):
def __init__(self, cmd, callback):
self.__cmd = cmd
self.__callback = callback
threading.Th
11 matches
Mail list logo