changeset 22:221095f3a4af

all load done but a bad chop
author devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
date Wed, 19 Dec 2007 14:21:30 -0500
parents 8b55aaa52ce9
children 07aae987b754
files cmd2.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/cmd2.py	Wed Dec 19 13:40:39 2007 -0500
+++ b/cmd2.py	Wed Dec 19 14:21:30 2007 -0500
@@ -17,7 +17,7 @@
     multilineCommands = []
     continuationPrompt = '> '    
     shortcuts = {'?': 'help', '!': 'shell', '@': 'load'}   
-    excludeFromHistory = '''run r list l history hi ed li'''.split()   
+    excludeFromHistory = '''run r list l history hi ed li eof'''.split()   
     defaultExtension = 'txt'
     def __init__(self, *args, **kwargs):	
         cmd.Cmd.__init__(self, *args, **kwargs)
@@ -76,6 +76,10 @@
 		line = line[:-1] # chop \n
 	return line
 			    
+    def do_EOF(self, arg):
+	return True
+    do_eof = do_EOF
+    
     statementEndPattern = re.compile(r'[\n;]\s*$')	
     def statementHasEnded(self, lines):
 	"""This version lets statements end with ; or with a blank line.
@@ -164,7 +168,6 @@
                 return 	    
 	use_rawinput = self.use_rawinput
 	self.use_rawinput = False
-	print 'stdin = ' + str(self.stdin)
 	self.cmdloop()
 	self.stdin.close()
 	self.stdin = stdin