#Cisco IOS test
try:
tel = Telnet(login_wait='name: ', password_wait='assword: ', host='192.168.148.26', port=23, user='xxx',
passwd='xxx', prompt='>', timeout=5, enable_string='enable', enable_wait='assword:', enable_prompt='#',
enable_passwd='xxxx', init_command='term length 0', debuglevel=0)
tel.open()
tel.set_timeout(600)
tel.set_debuglevel(0)
ver = tel.run_command('show ver')
for line in ver:
print line
except Exception as e:
print 'show run error: ' + str(e)
#Isam test
isam = Telnet(login_wait='ogin: ', password_wait='assword: ', host='10.165.12.15', port=23, user='isadmin', passwd='xxxxxxx', prompt='#', timeout=5)
# port=23, user='script', passwd='xxxxxx', prompt='>', timeout=5,
# enable_string='enable', enable_prompt='#', init_command='scroll 512')
#Cisco IOS-XR test
#Cisco - only pasword and enable
#For module Cisco
#TL1