Why does Paramiko hang if you use it while loading a module?
问题 Put the following into a file hello.py (and easy_install paramiko if you haven't got it): hostname,username,password='fill','these','in' import paramiko c = paramiko.SSHClient() c.set_missing_host_key_policy(paramiko.AutoAddPolicy()) c.connect(hostname=hostname, username=username, password=password) i,o,e = c.exec_command('ls /') print(o.read()) c.close() Fill in the first line appropriately. Now type python hello.py and you'll see some ls output. Now instead type python and then from within