#NEWLINE# @ classmethod #NEWLINE# @ usage ( 'console [CONNECTION]' ) #NEWLINE# def console( cls , connection = None ) : #NEWLINE# #INDENT# 'start an API console for CONNECTION' #NEWLINE# filename = cls . _get_config_filename ( connection ) #NEWLINE# if ( not os . path . exists ( filename ) ) : #NEWLINE# #INDENT# cls . _no_config_file_error ( filename ) #NEWLINE# #UNINDENT# with open ( filename ) as f : #NEWLINE# #INDENT# config = yaml . safe_load ( f . read ( ) ) #NEWLINE# #UNINDENT# print ( ( 'using %s' % config [ 'domain' ] ) ) #NEWLINE# session = cls . _session_from_config ( config ) #NEWLINE# shopify . ShopifyResource . activate_session ( filename ) #NEWLINE# start_interpreter ( shopify = shopify )