We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sometimes the prompt (PS C:\Users\foo>) does not appear, but after I press enter, there will be 2 prompts.
PS C:\Users\foo>
enter
import threading from winpty import PtyProcess, PTY def read_output(proc): while proc.isalive(): output = proc.read() print(output, end="") proc = PtyProcess.spawn("powershell.exe") # proc = PTY(80, 25) # proc.spawn("cmd.exe") thread = threading.Thread(target=read_output, args=(proc,)) thread.start() while True: command = input() proc.write(command + "\r") # proc.terminate()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Sometimes the prompt (
PS C:\Users\foo>
) does not appear, but after I pressenter
, there will be 2 prompts.The text was updated successfully, but these errors were encountered: