--- a/ThirdParty/Pygments/pygments/lexers/_luabuiltins.py Fri Jan 01 16:11:36 2010 +0000 +++ b/ThirdParty/Pygments/pygments/lexers/_luabuiltins.py Sat Jan 02 15:11:35 2010 +0000 @@ -149,7 +149,7 @@ if __name__ == '__main__': import re - import urllib + import urllib.request, urllib.parse, urllib.error import pprint # you can't generally find out what module a function belongs to if you @@ -195,7 +195,7 @@ def get_newest_version(): - f = urllib.urlopen('http://www.lua.org/manual/') + f = urllib.request.urlopen('http://www.lua.org/manual/') r = re.compile(r'^<A HREF="(\d\.\d)/">Lua \1</A>') for line in f: m = r.match(line) @@ -203,7 +203,7 @@ return m.groups()[0] def get_lua_functions(version): - f = urllib.urlopen('http://www.lua.org/manual/%s/' % version) + f = urllib.request.urlopen('http://www.lua.org/manual/%s/' % version) r = re.compile(r'^<A HREF="manual.html#pdf-(.+)">\1</A>') functions = [] for line in f: @@ -213,7 +213,7 @@ return functions def get_function_module(name): - for mod, cb in module_callbacks().iteritems(): + for mod, cb in module_callbacks().items(): if cb(name): return mod if '.' in name: @@ -240,13 +240,13 @@ def run(): version = get_newest_version() - print '> Downloading function index for Lua %s' % version + print('> Downloading function index for Lua %s' % version) functions = get_lua_functions(version) - print '> %d functions found:' % len(functions) + print('> %d functions found:' % len(functions)) modules = {} for full_function_name in functions: - print '>> %s' % full_function_name + print('>> %s' % full_function_name) m = get_function_module(full_function_name) modules.setdefault(m, []).append(full_function_name)