def list_downloadable_sources(target_dir):
 return [os.path.join(target_dir, fname) for fname in os.listdir(target_dir) if fname.endswith('.py')]

def list_downloadable_sources ( target_dir ) : return [ os . path . join ( target_dir , fname ) for fname in os . listdir ( target_dir ) if fname . endswith ( '.py' ) ]
returns a list of python source files is target_dir parameters target_dir : string path to the directory where python source file are returns list list of paths to all python source files in target_dir .