def execute_yql_query(yql):

    conn = httplib.HTTPConnection('query.yahooapis.com')
    query_string = urllib.urlencode({
        'q': yql,
        'format': 'json',
        'env': DATATABLES_URL
    })
    conn.request('GET', PUBLIC_API_URL + '?' + query_string)
    return json.loads(conn.getresponse().read())
Returns the JSON response of the given YQL query.
dataset/ETHPy150Open gurch101/StockScraper/stockretriever.py/execute_yql_query