zooui.converters.converter module¶
A threaded media converter (abstract base class).
- class zooui.converters.converter.Converter(infile, outfile)[source]¶
Bases:
Thread- Constructor :
Converter(infile, outfile)
- Parameters :
infile : str outfile : str
Converter(infile, outfile) –> None
Converter objects are used for converting media.
Create a new Converter for converting media at the location given by infile to the location given by outfile.
Where appropriate, the output format will be determined from the file extension of outfile.
This constructor should always be called with keyword arguments. Arguments are:
group should be None; reserved for future extension when a ThreadGroup class is implemented.
target is the callable object to be invoked by the run() method. Defaults to None, meaning nothing is called.
name is the thread name. By default, a unique name is constructed of the form “Thread-N” where N is a small decimal number.
args is a list or tuple of arguments for the target invocation. Defaults to ().
kwargs is a dictionary of keyword arguments for the target invocation. Defaults to {}.
If a subclass overrides the constructor, it must make sure to invoke the base class constructor (Thread.__init__()) before doing anything else to the thread.
- run()[source]¶
- Method :
Converter.run()
- Parameters :
None
Converter.run() –> None
Run the conversion. If any errors are encountered then
self.errorwill be set to a string describing the error.
- property progress¶
- Property:
Converter.progress
- Parameters :
None
Converter.progress –> float
Conversion progress ranging from 0.0 to 1.0. A value of 1.0 indicates that the converter has completely finished.