fixed print statements for python3
This commit is contained in:
parent
bdaf07d941
commit
ffdee6b48c
8 changed files with 61 additions and 63 deletions
|
@ -118,7 +118,7 @@ def get_lexer_for_filename(_fn, code=None, **options):
|
|||
|
||||
if matches:
|
||||
matches.sort(key=get_rating)
|
||||
#print "Possible lexers, after sort:", matches
|
||||
#print("Possible lexers, after sort:", matches)
|
||||
return matches[-1][0](**options)
|
||||
raise ClassNotFound('no lexer for filename %r found' % _fn)
|
||||
|
||||
|
|
|
@ -233,13 +233,13 @@ if __name__ == '__main__':
|
|||
|
||||
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)
|
||||
|
||||
|
|
|
@ -319,7 +319,7 @@ if __name__ == '__main__':
|
|||
for filename in os.listdir('.'):
|
||||
if filename.endswith('.py') and not filename.startswith('_'):
|
||||
module_name = 'pygments.lexers.%s' % filename[:-3]
|
||||
print module_name
|
||||
print(module_name)
|
||||
module = __import__(module_name, None, None, [''])
|
||||
for lexer_name in module.__all__:
|
||||
lexer = getattr(module, lexer_name)
|
||||
|
|
|
@ -3777,10 +3777,10 @@ if __name__ == '__main__':
|
|||
f.close()
|
||||
|
||||
def run():
|
||||
print '>> Downloading Function Index'
|
||||
print('>> Downloading Function Index')
|
||||
modules = get_php_functions()
|
||||
total = sum(len(v) for v in modules.itervalues())
|
||||
print '%d functions found' % total
|
||||
print('%d functions found' % total)
|
||||
regenerate(__file__, modules)
|
||||
shutil.rmtree(PHP_MANUAL_DIR)
|
||||
|
||||
|
|
|
@ -1057,13 +1057,13 @@ if __name__ == '__main__':
|
|||
|
||||
def run():
|
||||
version = get_version()
|
||||
print '> Downloading function index for SourceMod %s' % version
|
||||
print('> Downloading function index for SourceMod %s' % version)
|
||||
functions = get_sm_functions()
|
||||
print '> %d functions found:' % len(functions)
|
||||
print('> %d functions found:' % len(functions))
|
||||
|
||||
functionlist = []
|
||||
for full_function_name in functions:
|
||||
print '>> %s' % full_function_name
|
||||
print('>> %s' % full_function_name)
|
||||
functionlist.append(full_function_name)
|
||||
|
||||
regenerate(__file__, functionlist)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue