Advertisement
Guest User

Untitled

a guest
May 1st, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. cin >> input; //input is a QString here
  2. cout << input.toStdString() << flush;
  3.  
  4. proc = subprocess.Popen(["file.exe"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=FULL_PATH)
  5.  
  6. for line in proc.stdout: print line
  7.  
  8. proc.stdin.write("My string")
  9. proc.stdin.flush()
  10. print proc.stdout.readline()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement