(src, ext, dst)
Copies files with extensions "ext" from "src" to "dst" directory.
Copies files with extensions "ext" from "src" to "dst" directory.
Copies files with extensions ext from src to dst directory .
def copy_files(src, ext, dst):
    """  Copies files with extensions "ext" from "src" to "dst" directory. """
    src_path = os.path.join(os.path.dirname(__file__), src)
    dst_path = os.path.join(os.path.dirname(__file__), dst)
    file_list = os.listdir(src_path)
    for f in file_list:
        if f == '__init__.py':
            continue
        f_path = os.path.join(src_path, f)
        if os.path.isfile(f_path) and f.endswith(ext):
            shutil.copy(f_path, dst_path)
def copy_files ( src , ext , dst ) : src_path = os . path . join ( os . path . dirname ( __file__ ) , src ) dst_path = os . path . join ( os . path . dirname ( __file__ ) , dst ) file_list = os . listdir ( src_path ) for f in file_list : if f == '__init__.py' : continue f_path = os . path . join ( src_path , f ) if os . path . isfile ( f_path ) and f . endswith ( ext ) : shutil . copy ( f_path , dst_path )