Consider using a combination of "print()" and "waitfor()" as an alternative to this method when it doesn't do what you want, e.g. the command you send prompts for input.