commit | 983b00882400986b292837a25ef866fc897d603b | [log] [tgz] |
---|---|---|
author | Anthony Baxter <anthonybaxter@gmail.com> | Thu Feb 06 01:45:11 2003 +0000 |
committer | Anthony Baxter <anthonybaxter@gmail.com> | Thu Feb 06 01:45:11 2003 +0000 |
tree | 57dc9d3b234310806dca8ae5a892ca5f55ad7883 | |
parent | 985eba53f5d1ac45037fbf19b6955c74823c1ded [diff] |
Updated version of [ 558544 ] cmd.py: add instance-specific stdin/out This patch adds stdin, stdout as optional arguments to the cmd.Cmd constructor (defaulting to sys.stdin, sys.stdout), and changes the Cmd methods throughout to use self.stdout.write() and self.stdin.foo for output and input. This allows much greater flexibility for using cmd - for instance, hooking it into a telnet server. Patch for library module and for documentation.