osx下用python自动登录服务器(iterm2)

2015-11-10 0 670
osx下用python自动登录服务器(iterm2)
mport os
s = """osascript <<EOD
tell application "iterm"
    activate
    set myterm to (make new terminal)
    tell myterm
        launch session "Default Session"
        tell the last session
            write text "ssh user@ip"
            delay 3
            write text "password"
         end tell
    end tell
end tell
EOD"""
os.system(s)

遇见资源网 python osx下用python自动登录服务器(iterm2) http://www.ox520.com/15893.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务