Long running nautilus extensions



Hi all,

I'm not sure if this is the right place to ask, so if I should be asking
this somewhere else could somebody please direct me.

I'm writing an extension using the Python Nautilus extension that
converts Mp3 files to Ogg. I create a thread for each file to be
converted. While the threads are running I keep the main thread alive
by:

while threading.activeCount() > 1:
	time.sleep(3)

The problem is that this causes Nautilus to freeze until the selected
files have all been converted. I understand this is because I'm running
the extension in the main loop of Nautilus (correct me if I'm wrong). Is
there any way to work around this? How do I allow for an extension to
run for an extended period of time without blocking Nautilus itself. Is
there any call I can make within the loop that will allow Nautilus to do
its own processing and then return?

Lorenzo




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]