linecache - pydoc - phpman

Look up a command

 

Markdown Format | JSON API | MCP Server Tool


Help on module linecache:

NAME
    linecache - Cache lines from Python source files.

MODULE REFERENCE
    https://docs.python.org/3.10/library/linecache.html

    The following documentation is automatically generated from the Python
    source files.  It may be incomplete, incorrect or include features that
    are considered implementation detail and may vary between Python
    implementations.  When in doubt, consult the module reference at the
    location listed above.

DESCRIPTION
    This is intended to read lines from modules imported -- hence if a filename
    is not found, it will look down the module search path for a file by
    that name.

FUNCTIONS
    checkcache(filename=None)
        Discard cache entries that are out of date.
        (This is not checked upon each call!)

    clearcache()
        Clear the cache entirely.

    getline(filename, lineno, module_globals=None)
        Get a line for a Python source file from the cache.
        Update the cache if it doesn't contain an entry for this file already.

    lazycache(filename, module_globals)
        Seed the cache for filename with module_globals.

        The module loader will be asked for the source only when getlines is
        called, not immediately.

        If there is an entry in the cache already, it is not altered.

        :return: True if a lazy load is registered in the cache,
            otherwise False. To register such a load a module loader with a
            get_source method must be found, the filename must be a cacheable
            filename, and the filename must not be already cached.

DATA
    __all__ = ['getline', 'clearcache', 'checkcache', 'lazycache']

FILE
    /usr/lib/python3.10/linecache.py



Generated by phpMan Author: Che Dong Under GNU General Public License
2026-06-02 05:13 @216.73.216.198 CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 TransitionalValid CSS!