python-file-call-another-python-file.py
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'))
Comments