Mercurial > python-cmd2
diff cmd2.py @ 54:a791d615545c
oops, had to fix for redirect plus pipe
author | catherine@localhost |
---|---|
date | Mon, 09 Jun 2008 12:05:39 -0400 |
parents | 2811505b0969 |
children | f844b6c78192 f20dcfa69341 37f471fb29b1 |
line wrap: on
line diff
--- a/cmd2.py Mon Jun 09 10:46:00 2008 -0400 +++ b/cmd2.py Mon Jun 09 12:05:39 2008 -0400 @@ -266,7 +266,10 @@ self.stdout = open(redirect, mode) else: statement = '%s %s' % (statement, self.fileimport(statement=statement, source=redirect)) - stop = cmd.Cmd.onecmd(self, statement) + if isinstance(redirect, subprocess.Popen): + stop = self.onecmd(statement) + else: + stop = cmd.Cmd.onecmd(self, statement) try: if command not in self.excludeFromHistory: self.history.append(originalStatement)