#NEWLINE# @ cmdln . alias ( 'cd' ) #NEWLINE# @ cmdln . option ( '-t' , '--show-time' , action = 'store_true' , help = 'Also show the current time' ) #NEWLINE# def do_currentdate( self , subcmd , opts ) : #NEWLINE# #INDENT# '${cmd_name}: Show the current date\n        \n        ${cmd_usage}\n        ${cmd_option_list}\n        ' #NEWLINE# with self . bootstrapped ( ) : #NEWLINE# #INDENT# from datetime import datetime #NEWLINE# now = datetime . now ( ) #NEWLINE# LOG . debug ( 'datetime.now = %s' , now ) #NEWLINE# if subcmd . show_time : #NEWLINE# #INDENT# print ( now ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# print ( now . date ( ) )