Helper class to perform an action on a series of files.
Subclasses must define methods:
- beforeloop()
will be called once before the loop starts.
- beforefile()
will be called once before the operation is
performed on a file.
- treatfile(fn)
the operation itself.
|
Methods
|
|
__init__ abort loop makelist run
|
|
|
__init__
|
__init__ ( self, files )
Constructor.
parameters:
- files
list of files to treat
|
|
|
abort
|
abort ( self, arg=None )
Break the operation.
This can be bound to a GUI action, and it will break the
self.loop() if executed. |
|
|
loop
|
loop ( self )
Perform the action in self.treatfile on each file. |
|
|
makelist
|
makelist ( self, files )
Replace the file list by the one given in files.
This will make a copy and sort it. |
|
|
run
|
run ( self )
Perform the action |
|