I have a number of python scripts I want to pipe back to back about 1000 times, changing the input file for each
I was previously doing this with a bash shell script, but I need it to work on a windows machine now.
Here is the python, with the line in question commented out
namecount = 0
for file in files:
in_filestring = "test_" + str(namecount)
out_filestring = "out_ + str(namecount)
namecount += 1
#Run this on the command line: python pre.py < in_filestring | filter.py | a_filter.py > out_filestring
Can I use this here or is there a better method? I ask because I am currently reading subprocess http://docs.python.org/2/library/subprocess.html. Apparently it replaces the outdated os.system, but I don't understand how to use it yet.
import os
os.system('system command you want to run')