#NEWLINE# @ classmethod #NEWLINE# @ usage ( 'default [CONNECTION]' ) #NEWLINE# def default( cls , connection = None ) : #NEWLINE# #INDENT# 'show the default connection, or make CONNECTION the default' #NEWLINE# if ( connection is not None ) : #NEWLINE# #INDENT# target = cls . _get_config_filename ( connection ) #NEWLINE# if os . path . exists ( target ) : #NEWLINE# #INDENT# if os . path . exists ( cls . _default_symlink ) : #NEWLINE# #INDENT# os . remove ( cls . _default_symlink ) #NEWLINE# #UNINDENT# os . symlink ( target , cls . _default_symlink ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# cls . _no_config_file_error ( target ) #NEWLINE# #UNINDENT# #UNINDENT# if os . path . exists ( cls . _default_symlink ) : #NEWLINE# #INDENT# print ( ( 'Default connection is ' + cls . _default_connection ( ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# print ( 'There is no default connection set' )