#NEWLINE# def get_mturk_connection( sandbox = True , aws_access_key = None , aws_secret_key = None ) : #NEWLINE# #INDENT# '\n  Get a boto mturk connection. This is a thin wrapper over the\n  MTurkConnection constructor; the only difference is a boolean\n  flag to indicate sandbox or not.\n  ' #NEWLINE# kwargs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if ( aws_access_key is not None ) : #NEWLINE# #INDENT# kwargs [ 'aws_access_key_id' ] = aws_access_key #NEWLINE# #UNINDENT# if ( host is not None ) : #NEWLINE# #INDENT# kwargs [ 'aws_secret_access_key' ] = aws_secret_key #NEWLINE# #UNINDENT# if sandbox : #NEWLINE# #INDENT# host = 'mechanicalturk.sandbox.amazonaws.com' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# host = 'mechanicalturk.amazonaws.com' #NEWLINE# #UNINDENT# return MTurkConnection ( host = host , ** kwargs )