def __init__(self,
                 completekey='tab',
                 stdin=None,
                 stdout=None,
                 stderr=None):
        """Cmdln(completekey='tab', stdin=None, stdout=None, stderr=None)

        The optional argument 'completekey' is the readline name of a
        completion key; it defaults to the Tab key. If completekey is
        not None and the readline module is available, command completion
        is done automatically.

        The optional arguments 'stdin', 'stdout' and 'stderr' specify
        alternate input, output and error output file objects; if not
        specified, sys.* are used.

        If 'stdout' but not 'stderr' is specified, stdout is used for
        error output. This is to provide least surprise for users used
        to only the 'stdin' and 'stdout' options with cmd.Cmd.
        """
        import sys
        if self.name is None:
            self.name = os.path.basename(sys.argv[0])
        if self.prompt is None:
            self.prompt = self.name + "> "
        self._name_str = self._str(self.name)
        if stdin is not None:
            self.stdin = stdin
        else:
            self.stdin = sys.stdin
        if stdout is not None:
            self.stdout = stdout
        else:
            self.stdout = sys.stdout
        if stderr is not None:
            self.stderr = stderr
        elif stdout is not None:
            self.stderr = stdout
        else:
            self.stderr = sys.stderr
        self.cmdqueue = []
        self.completekey = completekey
        self.cmdlooping = False
def __init__ ( self , completekey = 'tab' , stdin = None , stdout = None , stderr = None ) : import sys if self . name is None : self . name = os . path . basename ( sys . argv [ 0 ] ) if self . prompt is None : self . prompt = self . name + "> " self . _name_str = self . _str ( self . name ) if stdin is not None : self . stdin = stdin else : self . stdin = sys . stdin if stdout is not None : self . stdout = stdout else : self . stdout = sys . stdout if stderr is not None : self . stderr = stderr elif stdout is not None : self . stderr = stdout else : self . stderr = sys . stderr self . cmdqueue = [ ] self . completekey = completekey self . cmdlooping = False
Cmdln(completekey='tab', stdin=None, stdout=None, stderr=None)

        The optional argument 'completekey' is the readline name of a
        completion key; it defaults to the Tab key. If completekey is
        not None and the readline module is available, command completion
        is done automatically.

        The optional arguments 'stdin', 'stdout' and 'stderr' specify
        alternate input, output and error output file objects; if not
        specified, sys.* are used.

        If 'stdout' but not 'stderr' is specified, stdout is used for
        error output. This is to provide least surprise for users used
        to only the 'stdin' and 'stdout' options with cmd.Cmd.