Mercurial > python-cmd2
changeset 189:06119abd352e
synch
author | catherine@Elli.myhome.westell.com |
---|---|
date | Fri, 30 Jan 2009 05:53:12 -0500 |
parents | 7ce8db01a847 |
children | 51c15fe803a4 |
files | cmd2.py setup.py |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/cmd2.py Wed Jan 28 13:14:05 2009 -0500 +++ b/cmd2.py Fri Jan 30 05:53:12 2009 -0500 @@ -26,7 +26,7 @@ """ import cmd, re, os, sys, optparse, subprocess, tempfile, pyparsing, doctest, unittest, string from optparse import make_option -__version__ = '0.4.4' +__version__ = '0.4.5' class OptionParser(optparse.OptionParser): def exit(self, status=0, msg=None): @@ -48,7 +48,7 @@ >>> remainingArgs('-f bar bar cow', ['bar', 'cow']) 'bar cow' ''' - pattern = '\s+'.join(newArgList) + '\s*$' + pattern = '\s+'.join(re.escape(a) for a in newArgList) + '\s*$' matchObj = re.search(pattern, oldArgs) return oldArgs[matchObj.start():]