angonz / tech2xl Goto Github PK
View Code? Open in Web Editor NEWPython script to extract info from Cisco devices commands and create an Excel file
License: GNU General Public License v2.0
Python script to extract info from Cisco devices commands and create an Excel file
License: GNU General Public License v2.0
Hi Andrés,
Please post an example of the sh tech file.
As a new user I don't understand if this file needs to list just the Cisco device IPs or some combination of IPs|passwords?
I am getting the following output :
python tech2xl.py report.xls show_tech.txt
tech2xl v1.5
0 devices
No device found
0.0019958019256591797 seconds
my show_tech.txt file is :
192.168.1.10
192.168.1.30
i try to lauch the script, but i receive:
$ python tech2xl.py report.xls show_tech.txt
tech2xl v1.5
(0, ' devices')
No device found
i have added ip and command in txt file, but not work
Hello Andres,
We have several Cisco CAT9K series switches (C9200L, C9300) and the code always gives the same error when we try to use the show tech or show interfaces status, C2960 series and C3560 work fine.
python tech2xl.py export.xls show-tech.txt
tech2xl v1.5
Traceback (most recent call last):
File "tech2xl.py", line 422, in
if intinfo[name][item]['Description'] == '':
KeyError: None
Hi,
Thanks for the code - wondering if you have seen the following error message when try to open output file .... I use Excel2016 (Desktop) and also using Office 365 as well - both of keep saying "couldn't open your workbook. It's possibly corrupt or using a file format that's not supported"
Note - I use the CLI to generate the report per following (Running Python 3.6):
tech2xl.py GWSW.xlsm GWSW_show_tech.txt
tech2xl v1.5
1 devices
99 interfaces
0 neighbors
0 modules
0.21657061576843262 seconds
Please let me know what you think.
Thanks,
Hi Angonz
Sorry, I'm not familiar with python
could you help me to figure it out?
MAC-Air:GigaBDR cp$ python tech2xl.py report.xls /Users/cp/Desktop/GigaBDR/BDR.txt
Traceback (most recent call last):
File "tech2xl.py", line 15, in
import xlwt
File "/usr/local/lib/python3.7/site-packages/xlwt/init.py", line 5, in
from .Row import Row
File "/usr/local/lib/python3.7/site-packages/xlwt/Row.py", line 9, in
from . import ExcelFormula
File "/usr/local/lib/python3.7/site-packages/xlwt/ExcelFormula.py", line 8, in
from . import ExcelFormulaParser, ExcelFormulaLexer
File "/usr/local/lib/python3.7/site-packages/xlwt/ExcelFormulaLexer.py", line 55, in
VERBOSE+LOCALE+IGNORECASE)
File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/re.py", line 234, in compile
return _compile(pattern, flags)
File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/sre_parse.py", line 940, in parse
p.pattern.flags = fix_flags(str, p.pattern.flags)
File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/sre_parse.py", line 907, in fix_flags
raise ValueError("cannot use LOCALE flag with a str pattern")
ValueError: cannot use LOCALE flag with a str pattern
Peters-Air:GigaBDR cp$
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.