import os
from pathlib import Path

EXT = set(['.jpg', '.gif', '.png'])

def main():
    for root, dirs, files in os.walk('./modules/'):
        # print(f'{root} {dirs} {files}')
        for f in files:
            if ' ' in f and os.path.splitext(f)[1] in EXT:
                path = Path(root) / f
                new_path = Path(root) / f.replace(' ', '_')
                print(f'{path} => {new_path}')
                os.rename(path, new_path)


    pass

if __name__ == "__main__":
    main()
dd82b32ede7f62e8473fc5d00d3a395f6caea0d4
<mask token>

<mask token>


def main():
    for root, dirs, files in os.walk('./modules/'):
        for f in files:
            if ' ' in f and os.path.splitext(f)[1] in EXT:
                path = Path(root) / f
                new_path = Path(root) / f.replace(' ', '_')
                print(f'{path} => {new_path}')
                os.rename(path, new_path)
    pass


if __name__ == '__main__':
    main()

<mask token>
EXT = set(['.jpg', '.gif', '.png'])


def main():
    for root, dirs, files in os.walk('./modules/'):
        for f in files:
            if ' ' in f and os.path.splitext(f)[1] in EXT:
                path = Path(root) / f
                new_path = Path(root) / f.replace(' ', '_')
                print(f'{path} => {new_path}')
                os.rename(path, new_path)
    pass


if __name__ == '__main__':
    main()

import os
from pathlib import Path
EXT = set(['.jpg', '.gif', '.png'])


def main():
    for root, dirs, files in os.walk('./modules/'):
        for f in files:
            if ' ' in f and os.path.splitext(f)[1] in EXT:
                path = Path(root) / f
                new_path = Path(root) / f.replace(' ', '_')
                print(f'{path} => {new_path}')
                os.rename(path, new_path)
    pass


if __name__ == '__main__':
    main()

import os
from pathlib import Path

EXT = set(['.jpg', '.gif', '.png'])

def main():
    for root, dirs, files in os.walk('./modules/'):
        # print(f'{root} {dirs} {files}')
        for f in files:
            if ' ' in f and os.path.splitext(f)[1] in EXT:
                path = Path(root) / f
                new_path = Path(root) / f.replace(' ', '_')
                print(f'{path} => {new_path}')
                os.rename(path, new_path)


    pass

if __name__ == "__main__":
    main()