# HG changeset patch # User devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil # Date 1198092090 18000 # Node ID 221095f3a4aff5ad8ad2a3fd0d80fed2ffcee2b8 # Parent 8b55aaa52ce95fd667ed89a429f8b8f9b3e9f19e all load done but a bad chop diff -r 8b55aaa52ce9 -r 221095f3a4af cmd2.py --- 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