Используйте параметр командной строки для загрузки сохраненной сессии с правой IP-адрес
The `-load' option causes PuTTY to load configuration details out
of a saved session. If these details include a host name, then this
option is all you need to make PuTTY start a session.
You need double quotes around the session name if it contains
spaces.
If you want to create a Windows shortcut to start a PuTTY saved
session, this is the option you should use: your shortcut should
call something like
d:\path\to\putty.exe -load "my session"
(Note that PuTTY itself supports an alternative form of this option,
for backwards compatibility. If you execute `putty @sessionname' it
will have the same effect as `putty -load "sessionname"'. With the
`@' form, no double quotes are required, and the `@' sign must be
the very first thing on the command line. This form of the option is
deprecated.)
You может использовать подпроцесс и передать ip с помощью str.format, вы также можете добавить путь к замазке к вашему PATH в переменных среды, а затем просто вызвать putty будет работать –
Вы можете использовать подпроцесс, вы также можете добавить путь к putty вашему PATH в ваших переменных окружения, то просто вызов шпатлевки будет работать , Вы также можете найти это полезное http://superuser.com/questions/515601/how-to-run-a-command-file-in-putty-using-automatic-login-in-a-command-prompt –