Hi all,
Im new to Python (3.7)
I'm Trying to automate Putty for SSH/Telnet/Serial connection
it more comfortable to do it through Putty because the connection type changes.
i want it to read the output from putty, so if it asks for "username" it will "answer" correctly.
this is my script:
Thanks in advance
Im new to Python (3.7)
I'm Trying to automate Putty for SSH/Telnet/Serial connection
it more comfortable to do it through Putty because the connection type changes.
i want it to read the output from putty, so if it asks for "username" it will "answer" correctly.
this is my script:
from pywinauto.application import Application from pynput.keyboard import Key, Controller print('Configuring') app = Application().start(cmd_line=u'"C:\\...putty.exe" ') puttyconfigbox = app.PuTTYConfigBox puttyconfigbox.wait('ready') listbox = puttyconfigbox.ListBox listbox.select(u'COM5') button = puttyconfigbox[u'&Load'] button.click() button2 = puttyconfigbox[u'&Open'] button2.click() keyboard = Controller() keyboard.press(Key.enter) keyboard.type('batm') keyboard.press(Key.enter) keyboard.type('enable\nconf t\n')how can i do it?
Thanks in advance
![[Image: E1qvXTm.png]](https://i.imgur.com/E1qvXTm.png)