Users Guide

Dell EMC Networking Python Support 1745
_sha512 functools platform traceback
_socket future_builtins plistlib tty
_sre gc popen2 types
_ssl genericpath poplib unicodedata
_strptime getopt posix urllib
_struct getpass posixfile urllib2
_symtable gettext posixpath urlparse
_sysconfigdata glob pprint user
_testcapi grp profile uu
_threading_local gzip pstats uuid
_warnings hashlib pty warnings
_weakref heapq pwd wave
_weakrefset hmac py_compile weakref
abc hotshot pyclbr webbrowser
aifc htmlentitydefs pydoc whichdb
antigravity htmllib pydoc_data wsgiref
anydbm httplib pyexpat xdrlib
argparse ihooks quopri xml
array imaplib random xmllib
ast imghdr re xmlrpclib
asynchat imp repr xxsubtype
asyncore importlib requests zipfile
atexit imputil resource zipimport
audiodev inspect rexec zlib
Enter any module name to get more help. Or, type "modules spam" to
search for modules whose descriptions contain the word "spam".
Note that the output of print statements only appears on the serial console.
One possible use for a Python script embedded on the switch is to perform
configuration tasks. Such a Python script might use the telnetlib package to
telnet into the switch console and perform some configuration. The following
script provides the basic framework for a local telnet session to the switch
console. The switch must be configured with an "admin" user, and telnet
access must be allowed or this code will fail. Readers should look at the
numerous articles on the Web for an explanation of the following Python
code.
#!/usr/bin/env python
import telnetlib
import os
import re
import time
import string