'Start and run interactive or batch mode CLI
mininet: Mininet network object
stdin: standard input for CLI
script: script to run in batch mode'

def __init__(self, mininet, stdin=sys.stdin, script=None):

    self.mn = mininet
    self.locals = {'net': mininet}
    self.stdin = stdin
    self.inPoller = poll()
    self.inPoller.register(stdin)
    self.inputFile = script
    Cmd.__init__(self)
    info('***    Starting    CLI:\n')
    if self.inputFile:
        self.do_source(self.inputFile)
        return
    self.initReadline()
    self.run()
