I am working on a python script that will walk through a large collection of .py files and write out individual .bat files that can be called upon to run these scripts.
I understand typical python output
directory = 'c:/'
OPATH = open(str(directory) + 'output_file.txt', 'w')
However if I try to do output_file.bat I receive an error, and it won't let me write out to it.
What I would like written in the batch files. Creating a BAT file for python script
Is there any documentation on how to write out other kinds of files with python? I would also be interested in having a python script generate .c files as well.