|
From: Benjamin D. <ben...@py...> - 2009-05-18 10:30:40
|
I am using the binary Linux pyfltk v1.1.4 build from the sourceforge website together with v2.5.2 of Python and v1.1.9 of fltk to create a GUI wrapper around a command line process to use hdparm to securely erase harddrives. To provide user feedback I am using Fl_repeat_timeout and then Fl.add_timeout to update a status bar and provide an animated image. Separate threads are called by the main program to process each drive using thread.start_new_thread(). The threads then invoke the command line utilities using commands.getstatusoutput(). The utilities do not immediately return - especially when falling back to the wipe function - and this causes the script to hang and the progress bar / animation to freeze giving the user the impression that it has hung. I have tried replacing commands.getstatusoutput() with subprocess.call() but the problem persists. This is my first time using Python and fltk. I've tried searching for more information on python threads but pretty much drawn a blank. Consequently, I should be grateful for any advice on how to ensure that the timer function continues to operate. Ben |