Skip to content

stewilliams-extr/port-list-expand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

port-list-expand

This is a simple python function that will expand a port list

Python file:

port-list-expand.py

Example output:

Computer:~$ python port-list-expand.py
port in is 1, and the list is ['1']
port in is 1-2, and the list is [1, 2]
port in is 1-3, and the list is [1, 2, 3]
port in is 1:1, and the list is ['1:1']
port in is 1:1-3, and the list is ['1:1', '1:2', '1:3']
port in is 1:1,1:2, and the list is ['1:1', '1:2']
port in is 1:1,2:2,2:10-12, and the list is ['1:1', '2:2', '2:10', '2:11', '2:12']
port in is 1/1, and the list is ['1/1']
port in is 1/1-5, and the list is ['1/1', '1/2', '1/3', '1/4', '1/5']
port in is 1/10,1/13,2/10-13, and the list is ['1/10', '1/13', '2/10', '2/11', '2/12', '2/13']

About

Simple python function to expand a port list

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages