def telnet_main():
 ip = raw_input('Enter IP Address: ')
 username = 'pyclass'
 password = getpass()
 test_device2 = NetworkDevice(ip, username, password)
 remote_conn = telnet.establish_connection(ip, username, password)
 telnet.disable_paging(remote_conn)
 remote_conn.write('\n')
 remote_conn.write('show version\n')
 time.sleep(1)
 test_device2.show_version = remote_conn.read_very_eager()
 remote_conn.close()
 process_show_version(test_device2)
 net_device_verification(test_device2)
 with open('telnet_file.pkl', 'wb') as f:
  pickle.dump(test_device2, f)

def telnet_main ( ) : ip = raw_input ( 'Enter IP Address: ' ) username = 'pyclass' password = getpass ( ) test_device2 = NetworkDevice ( ip , username , password ) remote_conn = telnet . establish_connection ( ip , username , password ) telnet . disable_paging ( remote_conn ) remote_conn . write ( '\n' ) remote_conn . write ( 'show version\n' ) time . sleep ( 1 ) test_device2 . show_version = remote_conn . read_very_eager ( ) remote_conn . close ( ) process_show_version ( test_device2 ) net_device_verification ( test_device2 ) with open ( 'telnet_file.pkl' , 'wb' ) as f : pickle . dump ( test_device2 , f )
process show version using telnet .