You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Low level usage using the raw `PTY` object
from winpty import PTY
# Start a new winpty-agent process of size (cols, rows)
cols, rows = 80, 25
process = PTY(cols, rows)
# Spawn a new console process, e.g., CMD
process.spawn(ur'C:\windows\system32\cmd.exe')
because Python 3.6 doesn't support UR prefix. You have to pass it as a string: process.spawn('C:\windows\system32\cmd.exe')
For Command Prompt if you use / instead of \ in the process.spawn() it doesn't work.
Is there a way to pass complicated command using PTY instead of PtyProcess?
Thanks
The text was updated successfully, but these errors were encountered:
@padremayi Sorry for such late response to your question. Python 3 supports unicode strings by default, so you just need to declare them using the r prefix.
The example in the main page is incorrect:
because Python 3.6 doesn't support UR prefix. You have to pass it as a string:
process.spawn('C:\windows\system32\cmd.exe')
For Command Prompt if you use / instead of \ in the process.spawn() it doesn't work.
Is there a way to pass complicated command using PTY instead of PtyProcess?
Thanks
The text was updated successfully, but these errors were encountered: