<commit_before>import globalPluginHandler
import os
import sys
import urllib
import ui

PLUGIN_DIR = os.path.dirname(__file__)

# Add bundled copy of PIL to module search path.
sys.path.append(PLUGIN_DIR)
import json
import urllib2
del sys.path[-1]

class GlobalPlugin(globalPluginHandler.GlobalPlugin):

	def script_announceNVDAVersion(self, gesture):
		response = urllib2.urlopen("http://api.openweathermap.org/data/2.5/weather?q=Hanford,us")
		content = response.read()
		ui.message(content)

	__gestures={
		"kb:NVDA+w": "announceNVDAVersion",
	}<commit_msg>Loads the reponse from JSON<commit_after>import globalPluginHandler
import os
import sys
import urllib
import ui

PLUGIN_DIR = os.path.dirname(__file__)

# Add bundled copy of PIL to module search path.
sys.path.append(PLUGIN_DIR)
import json
import urllib2
del sys.path[-1]

class GlobalPlugin(globalPluginHandler.GlobalPlugin):

	def script_announceNVDAVersion(self, gesture):
		response = urllib2.urlopen("http://api.openweathermap.org/data/2.5/weather?q=Hanford,us")
		content = response.read()
		ui.message(repr(json.loads(content)))

	__gestures={
		"kb:NVDA+w": "announceNVDAVersion",
	}
{'fraction_non_alphanumeric': 0.1115916955017301, 'fraction_numerical': 0.00865051903114187, 'mean_word_length': 5.969879518072289, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4215726', 'n_tokens_mistral': 422, 'n_tokens_neox': 399, 'n_words': 86}