Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import subprocess
- import os
- def tolist(folder):
- #subprocess have to print output in stdout
- output = subprocess.run(['python', './dev-utils/files_to_list.py', folder, '.json'], stdout=subprocess.PIPE)
- with open(os.path.join(folder, 'list.json'), 'w') as text_file:
- text_file.write(output.stdout.decode('utf-8'))
Advertisement
Add Comment
Please, Sign In to add comment