Getting output from external programs...

2006-06-18 Thread ph0b0s




Hi,

i'm making an mp3 conversion program in Python, but am kind of stuck
now.
The conversion routines work, using LAME, but now a i'm building a GUI
 with GLADE around it, and would like to be able to show LAME's output
 to the user in a status window in my gui.. but don't know where to
start...

The command i use to invoke LAME is this :


command = ("lame -b " +
str(bitrate) + " " + infile + " \"" + dir_outpath + separator + outfile
+ "\"")


         






-- 
http://mail.python.org/mailman/listinfo/python-list

Confused by subclassing, threading and scopes...

2006-06-22 Thread ph0b0s




I'm working on a program that needs a progress bar...

I have a gtk class, with a subclass in it that takes care of the
progress bar, but i seem to have a problem
 with the variable scope...

The program converts a complete directory of mp3's uing LAME, so it
first counts how many files 
 need to be converted, and then starts a loop that converts each file.
In this loop is a counter, that
 i use to calculate the fraction for the progressbar.

The progressbar thread doesn't seem to get the changed fraction
variable so it always stays at 0,
 while it increments correclty in the conversion method...

So i don't know what to do to be able to use the fraction variable
globally...



-- 
http://mail.python.org/mailman/listinfo/python-list