Hai friends
I have a some trouble in running a 3rd party program. This 3rd party program actually takes one file as input & does some processing on it and creates an output in a different folder with the same name, but with different file extention. I do it manually from DOS prompt. I automated this by using the following code
import os
import sys
for filename in os.listdir('d:\path2\subpath2'):
if filename.find('.txt') >= 0:
f1 = filename.split('.')
print f1,filename
x = "d:\\path1\\subpath1\\gpg -r encr -o d:\\dest1\\subdest\\" + f1[0] + ".txt.gpg -e d:\\path2\\subpath2\\" + filename
os.system(x)
When I execute this command manully in the DOS prompt, I get a (y/n) input, for which I usually give 'y'. But when the Python script executes it, the script stops to ask for the (y/n)input for each file. I want Python script itself to give 'y' as default input, without prompting for each file.
Is there anyway this can be done?