From c5e8f09b109a9b954aad78b20811f910972a12c9 Mon Sep 17 00:00:00 2001
From: cody burkard <cody@onlab.us>
Date: Mon, 15 Sep 2014 15:43:23 -0700
Subject: [PATCH] adding comments to CLI

---
 mininet/cli.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/mininet/cli.py b/mininet/cli.py
index 42a4d3d7..c6845804 100644
--- a/mininet/cli.py
+++ b/mininet/cli.py
@@ -395,6 +395,12 @@ def waitForNode( self, node ):
                 # read data but before it has been printed.
                 node.sendInt()
 
+    def precmd( self, line ):
+        "allow for comments in the cli"
+        if '#' in line:
+            line = line.split( '#' )[ 0 ]
+        return line
+
 
 # Helper functions
 
-- 
GitLab