@_ConfigurableFilter(executable='JPEGOPTIM_EXECUTABLE')
def jpegoptim(infile, executable='jpegoptim'):
 return runinplace('{} -p --strip-all -q %1'.format(executable), infile)

@ _ConfigurableFilter ( executable = 'JPEGOPTIM_EXECUTABLE' ) def jpegoptim ( infile , executable = 'jpegoptim' ) : return runinplace ( '{} -p --strip-all -q %1' . format ( executable ) , infile )
run jpegoptim on a file .