Mercurial > python-cmd2
changeset 191:9d9e9ea88daf
drop unused code
author | catherine@Elli.myhome.westell.com |
---|---|
date | Thu, 12 Feb 2009 04:29:43 -0500 |
parents | 51c15fe803a4 |
children | c0d4c7ba14a9 |
files | cmd2.py |
diffstat | 1 files changed, 0 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/cmd2.py Thu Feb 12 04:27:39 2009 -0500 +++ b/cmd2.py Thu Feb 12 04:29:43 2009 -0500 @@ -153,36 +153,6 @@ writeToPasteBuffer = getPasteBuffer pyparsing.ParserElement.setDefaultWhitespaceChars(' \t') -''' -def parseSearchResults(pattern, s): - generator = pattern.scanString(s) - try: - result, start, stop = generator.next() - result['before'], result['after'] = s[:start], s[stop:] - result['upToIncluding'] = s[:stop] - except StopIteration: - result = pyparsing.ParseResults('') - result['before'] = s - return result -''' - -def replaceInput(source): - if source: - newinput = open(source[0], 'r').read() - else: - newinput = getPasteBuffer() - - try: - if statement.inputFrom: - newinput = open(statement.inputFrom, 'r').read() - else: - newinput = getPasteBuffer() - except (OSError,), e: - print e - return 0 - start, end = self.redirectInPattern.scanString(statement.fullStatement).next()[1:] - return self.onecmd('%s%s%s' % (statement.fullStatement[:start], - newinput, statement.fullStatement[end:])) class ParsedString(str): pass