changeset 33:061f40299ed5

ed now perfect except for eof
author devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
date Fri, 21 Dec 2007 15:56:33 -0500
parents ebefe2d57e3b
children d3b2f9c6e536
files cmd2.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/cmd2.py	Fri Dec 21 15:31:17 2007 -0500
+++ b/cmd2.py	Fri Dec 21 15:56:33 2007 -0500
@@ -139,14 +139,14 @@
                 except ImportError:
                     pass    
 
-    
     def do_EOF(self, arg):
 	return True
     do_eof = do_EOF
     
-    statementEndPattern = re.compile(r'([%s]\s*)|(EOF)$' % terminators)	
+    statementEndPattern = re.compile(r'[%s]\s*$' % terminators)	
     def statementHasEnded(self, lines):
-	return bool(self.statementEndPattern.search(lines))
+	return bool(self.statementEndPattern.search(lines)) \
+               or lines[-3:] == 'EOF'
 	       
     def clean(self, s):
 	"""cleans up a string"""