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 = threading.Thread(target=player,args=(midicmd,fmidi,addlog)) xc.start() def player(mp,fm,callback): res=os.system(mp+' '+fm) os.remove(fm) return I tried in the player, both os.popen3 and os.system and os.popen3 with cmd+' &' and the same with os.system . But all do the same thing. Any ideas! Ta sree > > you can use threads, but try doing it the python way instead of the > java way. ;-) > def func(cmd, callback): > os.system(cmd) > callback() > xc = threading.Thread(target=func, args=(cmd, callback)) > xc.start() > > -- http://mail.python.org/mailman/listinfo/python-list