def get_imlist(path):
 return [os.path.join(path, f) for f in os.listdir(path) if f.endswith('.jpg')]

def get_imlist ( path ) : return [ os . path . join ( path , f ) for f in os . listdir ( path ) if f . endswith ( '.jpg' ) ]
returns a list of filenames for all jpg images in a directory .