Is it possible to output strings created from a print statement into a directory locally?
If so, would you use sysstdout module?
If so, would you use sysstdout module?
import os
path = '/Users/felishalawrence/testswps/vol1'
for file in os.listdir(path):
newFile = file[:file.rindex("v")]+"v20"
sys.stdout = '/Users/felishalawrence/testswps/vol1'
print newFile
Comment