SILENT KILLERPanel

Current Path: > > opt > hc_python > lib64 > python3.12 > site-packages > pip > _vendor > pygments >


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/hc_python/lib64/python3.12/site-packages/pip/_vendor/pygments/

NameTypeSizeLast ModifiedActions
__pycache__ Directory - -
filters Directory - -
formatters Directory - -
lexers Directory - -
styles Directory - -
__init__.py File 2983 bytes May 23 2025 10:34:25.
__main__.py File 353 bytes May 23 2025 10:34:25.
console.py File 1718 bytes May 23 2025 10:34:25.
filter.py File 1910 bytes May 23 2025 10:34:25.
formatter.py File 4390 bytes May 23 2025 10:34:25.
lexer.py File 35349 bytes May 23 2025 10:34:25.
modeline.py File 1005 bytes May 23 2025 10:34:25.
plugin.py File 1891 bytes May 23 2025 10:34:25.
regexopt.py File 3072 bytes May 23 2025 10:34:25.
scanner.py File 3092 bytes May 23 2025 10:34:25.
sphinxext.py File 7981 bytes May 23 2025 10:34:25.
style.py File 6420 bytes May 23 2025 10:34:25.
token.py File 6226 bytes May 23 2025 10:34:25.
unistring.py File 63208 bytes May 23 2025 10:34:25.
util.py File 10031 bytes May 23 2025 10:34:25.

Reading File: //opt/hc_python/lib64/python3.12/site-packages/pip/_vendor/pygments//modeline.py

"""
    pygments.modeline
    ~~~~~~~~~~~~~~~~~

    A simple modeline parser (based on pymodeline).

    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

import re

__all__ = ['get_filetype_from_buffer']


modeline_re = re.compile(r'''
    (?: vi | vim | ex ) (?: [<=>]? \d* )? :
    .* (?: ft | filetype | syn | syntax ) = ( [^:\s]+ )
''', re.VERBOSE)


def get_filetype_from_line(l): # noqa: E741
    m = modeline_re.search(l)
    if m:
        return m.group(1)


def get_filetype_from_buffer(buf, max_lines=5):
    """
    Scan the buffer for modelines and return filetype if one is found.
    """
    lines = buf.splitlines()
    for line in lines[-1:-max_lines-1:-1]:
        ret = get_filetype_from_line(line)
        if ret:
            return ret
    for i in range(max_lines, -1, -1):
        if i < len(lines):
            ret = get_filetype_from_line(lines[i])
            if ret:
                return ret

    return None

SILENT KILLER Tool