You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
# -*- coding: UTF-8 -*-
from pick import pick import sshserver
title = 'Please choose your favorite programming language: ' # options = ['quit', 'Java', 'JavaScript', 'Python', 'PHP', 'C++', 'Erlang', 'Haskell'] options = ['ckqas:192.168.1.44:22', 'ckqas129:192.168.1.129:22'] # option, index = pick(options, title) # print(option, index)
if __name__ == '__main__': while True: option, index = pick(options, title) if option == "quit": exit(0)
arr = option.split(":") if len(arr) == 3: host = arr[1] port = int(arr[2]) sshserver.NewTerminal(host, port, "daniel")
|