MCPcopy Create free account
hub / github.com/csslc/PiSA-SR / write_png_paths

Function write_png_paths

scripts/get_path.py:3–8  ·  view source on GitHub ↗
(folder_path, txt_path)

Source from the content-addressed store, hash-verified

1import os
2
3def write_png_paths(folder_path, txt_path):
4 with open(txt_path, 'w') as f:
5 for root, dirs, files in os.walk(folder_path):
6 for file in files:
7 if file.endswith('.png'):
8 f.write(os.path.join(root, file) + '\n')
9
10# Example usage:
11folder_path = ''

Callers 1

get_path.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected