-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
------------------- * [fix] dependency packaging
- Loading branch information
1 parent
73f65f5
commit 27d197d
Showing
4 changed files
with
29 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
"""Example SwVersion.""" | ||
|
||
import re | ||
from netports import SwVersion | ||
|
||
text = "Cisco IOS Software, C2960X Software (C2960X-UNIVERSALK9-M), Version 15.2(4)E10, ..." | ||
text = re.search(r"Version (\S+),", text)[1] | ||
|
||
version1 = SwVersion(text) # 15.2(4)E10 | ||
version2 = SwVersion("15.2(4)E11") | ||
|
||
assert version1 < version2 | ||
assert version1 <= version2 | ||
assert not version1 > version2 | ||
assert not version1 >= version2 | ||
print(version1) | ||
print(version2) | ||
# 15.2(4)e10 | ||
# 15.2(4)e11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters