view testcmd.py @ 29:a6f68b25ae16

load is perfect
author devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
date Fri, 21 Dec 2007 10:04:26 -0500
parents dd1cc6630a65
children 2739250177ed
line wrap: on
line source

import cmd2

class test(cmd2.Cmd):
    binarypar = True
    settable = ['prompt', 'binarypar']
    def do_sing(self, arg):
        '''Sings.  
        
        Hums if it has to fake it.'''
        print arg or 'hmm hmm hmm'
    def do_shout(self, arg):
        print arg.upper()
    def do_quit(self, arg):
        return 1
    multilineCommands = ['shout']

t = test()
t.cmdloop()