##// END OF EJS Templates
remove python2 code
remove python2 code

File last commit:

r23109:7d1b4930
r23109:7d1b4930
Show More
ulinecache.py
16 lines | 460 B | text/x-python | PythonLexer
"""
Wrapper around linecache which decodes files to unicode according to PEP 263.
"""
import functools
import linecache
import sys
from IPython.utils import py3compat
from IPython.utils import openpy
getline = linecache.getline
# getlines has to be looked up at runtime, because doctests monkeypatch it.
@functools.wraps(linecache.getlines)
def getlines(filename, module_globals=None):
return linecache.getlines(filename, module_globals=module_globals)