[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/jsoref/bpython/master/bpython/patch_linecache.py [Back]  [Original]

import linecache


class BPythonLinecache(dict):
    """Replaces the cache dict in the standard-library linecache module,
    to also remember (in an unerasable way) bpython console input."""

    def __init__(self, *args, **kwargs):
        super(BPythonLinecache, self).__init__(*args, **kwargs)
        self.bpython_history = []

    def is_bpython_filename(self, fname):
        try:
            return fname.startswith('

Web Proxy Viewer  |  New URL  |  Original Page