This is one example,  how to get cisco config with python

#!/usr/bin/python
import sys
from Exscript.util.interact import read_login
from Exscript.protocols import SSH2
from Exscript import Host, Account
con = SSH2()
conta = Account(‘LOGIN’, ‘PASSWORD’)
con.connect(“EQUIPAMENT”)
con.login(conta)
#to disable paging
con.execute(“terminal length 0”)
con.execute(“show config”)
print con.response
#to enable paging
con.execute(“terminal length 24”)
con.send(“exit\r”);
con.close()

Enjoy 😉