Omit module names from cross-reference to classes

Background I have a project called ciscoconfparse, which is documented with Sphinx; the documentation for the project is here. The source code directory has multiple files: ciscoconfparse.py...

ciscoconfparse in Python 3.4 module doesn't import correctly

I'm trying to install a python module called ciscoconfparse on Linux Mint 17. When I install it with pip with python 2, all works well when I try to import, but when I try it with pip3 (for...

select a list of interfaces with Python CISCOCONFPARSE and regex

I use a double loop to select all interfaces GigabitEthernet1/0/1 to 1/0/16 and 2/0/1 to 2/0/16 using efficient tool CISCOCONFPARSE : here is the example, that works : CONFIG_PARSED =...

python multiprocessing pathos - AuthenticationError: digest sent was rejected - Windows

Kindly help... I have this simply script that runs on Linux (Ubuntu) without any problem, but gives AuthenticationError: digest sent was rejected on Windows and i know its something to do with...

Python ciscoconfparse - build a basic config file

I am trying to create a cisco basic config based in a full config file. Following some examples of the full file configuration: ! policy-map QOS class GOLD priority percent 10 ...

Python and Flask - Trying to have a function return a file content

I am struggling to return a file content back to the user. Have a Flask code that receives a txt file from an user, then the Python function transform() is called in order to parse the infile,...

Pexpect - login to Cisco device, grab just the hostname from the config.

I am running a python script that uses pexpect to send commands to a cisco device. In the process I need to get the device's hostname. I have the IP, but need the hostname. There are two ways to...

Port Number 'mangle' when importing CSV into Excel 2010

Update: I'm now seeing CSV writer correctly parsing the port numbers, even with using the dialect='excel'. Not sure what I was seeing earlier but it clearly was NOT doing so earlier. I have to...

Error message while running python script to parse IOS config files

I have been able to write a python script that parses IOS config files but I am getting an error. Below is the script: import glob, os from ciscoconfparse import CiscoConfParse os.chdir("T:/") for...

using CiscoConfParse to find ACL applied to VTY and then check ACL for log statement

I have the code to find the name of the 'access-class' on the 'line vty' After that I am able to find the ACL but then I want to check each line of the ACL to verify that the 'deny' and 'permit'...

Need help parsing Cisco output

I am having some issue trying to parse the mrib table of a router. I have been able to parse some of it out but having issue. For example I have the following output: (192.168.1.1,232.0.6.8) RPF...

OOP workflow for data

I've worked with the Python basics for some time and fall back to mysql for data analysis. Now I want to learn how to do OOP the Python way, but with all the reading about classes, objects and...

How to describe scopes in EBNF?

I'm trying to write a parser for Cisco IOS and ASA configurations, using Grako and Python. I'm trying to figure out how to represent 'scoped' keywords in EBNF - for example, the 'description'...

Docker - Python dependencies for installing modules via pip

I am building a Django implementation with docker. I'm using the python container as base, but in my requirements file I have the...

Package upload to pypi.org broken

I have been trying to workaround the latest changes to pypi for hours, and I can't find a way to do it. My usual method of running python setup.py register; python setup.py bdist_wheel sdist...

Read remote configs using Paramiko + CiscoConfParse

I've a script that connects to an IPAM tool via api, gets newly created vlans and then performs 'device q {vlan}' on a remote rancid server via paramiko. From this I get a dictionary of devices...

PyInstaller: IOError: [Errno 2] No such file or directory: with ciscoconfparse library

I created an .exe of my python code using pyinstaller and it was working fine. But after importing this specific package "from ciscoconfparse import CiscoConfParse ", pyinstaller is able to create...

python pandas concat : ValueError: Shape of passed values is (4, 9), indices imply (4, 5)

I am logging into various network devices and trying to concat the output. Below is the script i am running and its working fine perfectly. I am facing the issue when i am trying to Concat the...

Parse through Cisco Config

I been trying to write a Python script to go through 20 some cisco configurations. So Far, I got a script to work on one config and it parsed out the interfaces that do not have 802.1x...

ciscoconfparse unable to import python3.7 win10

Any new solution for this. I am unable to from ciscoconfparse import CiscoConfParse I tried several versions of ciscoconfparse in python3 usin gpowershell in windows10. Python 3.7.0...

Python Module CiscoConfParse returns only the 1st IPv6 address on an interface

I'm trying to use CiscoConfParse on Cisco IOS config where the Interfaces have more than IPv6 address and I'm only getting the 1st IP address. Code, input file and output below What am I doing...

Split a list on a key word which may appear multiple times

I've read the examples which seem similar but I am not at that level to understand the answers. I want to take the list output and write each interface as a separate line (aka list I write to a...

Python - Read Specific Lines of Text

I'm trying to search files for specific text. Then print the line immediately prior to the line, and all subsequent lines that start with a specific character, particularly a 'space.' Here's a...

Can I use two ciscoconfparse objects in a single Cisco IOS config file to get specific interfaces

Trying to use two of the conf objects find_objects_w_child & find_objects_wo_child in a single file. I need to find out "interfaces" from a Cisco config file which have a specific QoS...

How to fix "AttributeError: 'module' object has no attribute 'SOL_UDP'" error in Python Connector Mule

I'm trying to execute a basic script to return Cisco Config File as a JSON Format, and I have a success process over Python2.7.16 and Python 3.7.3, but when I'm trying to execute the same script...

Python : get running_config from cisco switch by SSH(Paramiko) OR TELNET(Telnetlib)

I need some help for a script in Python. it works for few times, but I just added some time.sleep() and now the script won't work : It did not connect to switch by SSH or Telnet. I also need some...

NAPALM library not been imported when using PyInstaller

I have successfully used Pyinstaller for a while and never faced issue with a library which was installed using pip. However recently i created a program using NAPALM library which is running...

config from router shows as one line need multiline for ciscoconfparse

Network guy that's new to Python and programming and found this ciscoconfparse library that looks to have some pretty useful features. I'm running into an issue that I'm sure is something basic,...

How to merge values with same keys in a nested dictionary? (Nothing works)

First thing's first I am new to Python programming so any help is GREATLY appreciated. I am having issues combining the same key values from different dictionaries so that it is a single key value...

Python ciscoconfparse to find shutdown interfaces and the whole interface block?

The following examples will use this configuration which is taken from http://pennington.net/tutorial/ciscoconfparse/ccp_tutorial.html#slide3 ! filename:exampleswitch.conf ! hostname...