2

The .exe requires two input in sequence such as:

  1. what is your input 1: File1
  2. what is your input 2: File2

Then it will run. I am trying to use

p = subprocess.Popen([.exe, File1], cwd=filename_dir, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
time.sleep(1)
p.communicate(input=File2)

and it does not work, any help?

Christian König
  • 3,437
  • 16
  • 28
Tom
  • 25
  • 5

1 Answers1

0

The question has been solved and thanks for @be_good_do_good and
stackoverflow.com/a/165662/5334188

p = subprocess.Popen([analyzer, filename1], cwd=filename_dir,        stdin=subprocess.PIPE, stdout=subprocess.PIPE)
time.sleep(1)

m=p.communicate(input=b'filename1\nfilename2\n')[0]
Tom
  • 25
  • 5