0

i am using python 2.7.4 and need help to call a program kendall.exe kendall.exe uses two inputs which it asks from the console(displaying its messages and reading input). i have to do this through a python program using the subprocess module. using the Popen function, the program opens but i cannot pass it input, neither does it produce its output(no question of it). here is what i have till now:

string="/Kendall/mann-kendall/Kendall.exe"
process=subprocess.Popen(string,stdin=subprocess.PIPE,stdout=subprocess.PIPE);
smsc=process.stdout.read()
process.stdout.write(file_1+"\n")
smsc=process.stdout.read()
process.stdout.write(file_2+"\n"+"\n")
p=process.wait();

1 Answer 1

1
process.stdout.write(...)

? ITYM

process.stdin.write(...)

as, if you want to send data to that program, it gets them via its stdin...

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.