# coding=utf-8 # Copyright 2008-9, Sean B. Palmer, inamidst.com # Copyright 2012, Elsie Powell, embolalia.com # Licensed under the Eiffel Forum License 2. from __future__ import unicode_literals, absolute_import, print_function, division import re import requests from module import commands, example import json import sys if sys.version_info.major < 3: from urllib import quote_plus else: from urllib.parse import quote_plus def formatnumber(n): """Format a number with beautiful commas.""" parts = list(str(n)) for i in range((len(parts) - 3), 0, -3): parts.insert(i, ',') return ''.join(parts) r_bing = re.compile(r'