Mercurial > sqlpython
changeset 252:ae1d89f09a88
new \di
author | catherine@Elli.myhome.westell.com |
---|---|
date | Thu, 12 Mar 2009 21:02:07 -0400 |
parents | aa33f495a289 |
children | e4b741d882b7 |
files | sqlpython/mysqlpy.py |
diffstat | 1 files changed, 6 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/sqlpython/mysqlpy.py Thu Mar 12 17:36:25 2009 -0400 +++ b/sqlpython/mysqlpy.py Thu Mar 12 21:02:07 2009 -0400 @@ -106,17 +106,14 @@ which get and run SQL scripts from disk.''' self.onecmd(self.query_load10g) + def do_hello(self, arg): + print 'Hello, World!' + @options([make_option('-u', '--uppercase', action='store_true', help='use ALL CAPS')]) - def do_greet(self, args, opts): - ''' - Documentation for the command goes into this string - at the beginning of the method. - ''' - result = 'Hello' - for name in args.split(): - result += ',' + name - result += '!\n' + def do_greet(self, arg, opts): + 'Provides a personalized greeting.' + result = 'Hello %s!\n' % arg if opts.uppercase: result = result.upper() self.stdout.write(result)