GRAYBYTE WORDPRESS FILE MANAGER9188

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.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
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/alt/python35/lib64/python3.5/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/alt/python35/lib64/python3.5//tokenize.py
"""Tokenization help for Python programs.

tokenize(readline) is a generator that breaks a stream of bytes into
Python tokens.  It decodes the bytes according to PEP-0263 for
determining source file encoding.

It accepts a readline-like method which is called repeatedly to get the
next line of input (or b"" for EOF).  It generates 5-tuples with these
members:

    the token type (see token.py)
    the token (a string)
    the starting (row, column) indices of the token (a 2-tuple of ints)
    the ending (row, column) indices of the token (a 2-tuple of ints)
    the original line (string)

It is designed to match the working of the Python tokenizer exactly, except
that it produces COMMENT tokens for comments and gives type OP for all
operators.  Additionally, all token lists start with an ENCODING token
which tells you which encoding was used to decode the bytes stream.
"""

__author__ = 'Ka-Ping Yee <ping@lfw.org>'
__credits__ = ('GvR, ESR, Tim Peters, Thomas Wouters, Fred Drake, '
               'Skip Montanaro, Raymond Hettinger, Trent Nelson, '
               'Michael Foord')
from builtins import open as _builtin_open
from codecs import lookup, BOM_UTF8
import collections
from io import TextIOWrapper
from itertools import chain
import re
import sys
from token import *

cookie_re = re.compile(r'^[ \t\f]*#.*?coding[:=][ \t]*([-\w.]+)', re.ASCII)
blank_re = re.compile(br'^[ \t\f]*(?:[#\r\n]|$)', re.ASCII)

import token
__all__ = token.__all__ + ["COMMENT", "tokenize", "detect_encoding",
                           "NL", "untokenize", "ENCODING", "TokenInfo"]
del token

COMMENT = N_TOKENS
tok_name[COMMENT] = 'COMMENT'
NL = N_TOKENS + 1
tok_name[NL] = 'NL'
ENCODING = N_TOKENS + 2
tok_name[ENCODING] = 'ENCODING'
N_TOKENS += 3
EXACT_TOKEN_TYPES = {
    '(':   LPAR,
    ')':   RPAR,
    '[':   LSQB,
    ']':   RSQB,
    ':':   COLON,
    ',':   COMMA,
    ';':   SEMI,
    '+':   PLUS,
    '-':   MINUS,
    '*':   STAR,
    '/':   SLASH,
    '|':   VBAR,
    '&':   AMPER,
    '<':   LESS,
    '>':   GREATER,
    '=':   EQUAL,
    '.':   DOT,
    '%':   PERCENT,
    '{':   LBRACE,
    '}':   RBRACE,
    '==':  EQEQUAL,
    '!=':  NOTEQUAL,
    '<=':  LESSEQUAL,
    '>=':  GREATEREQUAL,
    '~':   TILDE,
    '^':   CIRCUMFLEX,
    '<<':  LEFTSHIFT,
    '>>':  RIGHTSHIFT,
    '**':  DOUBLESTAR,
    '+=':  PLUSEQUAL,
    '-=':  MINEQUAL,
    '*=':  STAREQUAL,
    '/=':  SLASHEQUAL,
    '%=':  PERCENTEQUAL,
    '&=':  AMPEREQUAL,
    '|=':  VBAREQUAL,
    '^=': CIRCUMFLEXEQUAL,
    '<<=': LEFTSHIFTEQUAL,
    '>>=': RIGHTSHIFTEQUAL,
    '**=': DOUBLESTAREQUAL,
    '//':  DOUBLESLASH,
    '//=': DOUBLESLASHEQUAL,
    '@':   AT,
    '@=':  ATEQUAL,
}

class TokenInfo(collections.namedtuple('TokenInfo', 'type string start end line')):
    def __repr__(self):
        annotated_type = '%d (%s)' % (self.type, tok_name[self.type])
        return ('TokenInfo(type=%s, string=%r, start=%r, end=%r, line=%r)' %
                self._replace(type=annotated_type))

    @property
    def exact_type(self):
        if self.type == OP and self.string in EXACT_TOKEN_TYPES:
            return EXACT_TOKEN_TYPES[self.string]
        else:
            return self.type

def group(*choices): return '(' + '|'.join(choices) + ')'
def any(*choices): return group(*choices) + '*'
def maybe(*choices): return group(*choices) + '?'

# Note: we use unicode matching for names ("\w") but ascii matching for
# number literals.
Whitespace = r'[ \f\t]*'
Comment = r'#[^\r\n]*'
Ignore = Whitespace + any(r'\\\r?\n' + Whitespace) + maybe(Comment)
Name = r'\w+'

Hexnumber = r'0[xX][0-9a-fA-F]+'
Binnumber = r'0[bB][01]+'
Octnumber = r'0[oO][0-7]+'
Decnumber = r'(?:0+|[1-9][0-9]*)'
Intnumber = group(Hexnumber, Binnumber, Octnumber, Decnumber)
Exponent = r'[eE][-+]?[0-9]+'
Pointfloat = group(r'[0-9]+\.[0-9]*', r'\.[0-9]+') + maybe(Exponent)
Expfloat = r'[0-9]+' + Exponent
Floatnumber = group(Pointfloat, Expfloat)
Imagnumber = group(r'[0-9]+[jJ]', Floatnumber + r'[jJ]')
Number = group(Imagnumber, Floatnumber, Intnumber)

StringPrefix = r'(?:[bB][rR]?|[rR][bB]?|[uU])?'

# Tail end of ' string.
Single = r"[^'\\]*(?:\\.[^'\\]*)*'"
# Tail end of " string.
Double = r'[^"\\]*(?:\\.[^"\\]*)*"'
# Tail end of ''' string.
Single3 = r"[^'\\]*(?:(?:\\.|'(?!''))[^'\\]*)*'''"
# Tail end of """ string.
Double3 = r'[^"\\]*(?:(?:\\.|"(?!""))[^"\\]*)*"""'
Triple = group(StringPrefix + "'''", StringPrefix + '"""')
# Single-line ' or " string.
String = group(StringPrefix + r"'[^\n'\\]*(?:\\.[^\n'\\]*)*'",
               StringPrefix + r'"[^\n"\\]*(?:\\.[^\n"\\]*)*"')

# Because of leftmost-then-longest match semantics, be sure to put the
# longest operators first (e.g., if = came before ==, == would get
# recognized as two instances of =).
Operator = group(r"\*\*=?", r">>=?", r"<<=?", r"!=",
                 r"//=?", r"->",
                 r"[+\-*/%&@|^=<>]=?",
                 r"~")

Bracket = '[][(){}]'
Special = group(r'\r?\n', r'\.\.\.', r'[:;.,@]')
Funny = group(Operator, Bracket, Special)

PlainToken = group(Number, Funny, String, Name)
Token = Ignore + PlainToken

# First (or only) line of ' or " string.
ContStr = group(StringPrefix + r"'[^\n'\\]*(?:\\.[^\n'\\]*)*" +
                group("'", r'\\\r?\n'),
                StringPrefix + r'"[^\n"\\]*(?:\\.[^\n"\\]*)*' +
                group('"', r'\\\r?\n'))
PseudoExtras = group(r'\\\r?\n|\Z', Comment, Triple)
PseudoToken = Whitespace + group(PseudoExtras, Number, Funny, ContStr, Name)

def _compile(expr):
    return re.compile(expr, re.UNICODE)

endpats = {"'": Single, '"': Double,
           "'''": Single3, '"""': Double3,
           "r'''": Single3, 'r"""': Double3,
           "b'''": Single3, 'b"""': Double3,
           "R'''": Single3, 'R"""': Double3,
           "B'''": Single3, 'B"""': Double3,
           "br'''": Single3, 'br"""': Double3,
           "bR'''": Single3, 'bR"""': Double3,
           "Br'''": Single3, 'Br"""': Double3,
           "BR'''": Single3, 'BR"""': Double3,
           "rb'''": Single3, 'rb"""': Double3,
           "Rb'''": Single3, 'Rb"""': Double3,
           "rB'''": Single3, 'rB"""': Double3,
           "RB'''": Single3, 'RB"""': Double3,
           "u'''": Single3, 'u"""': Double3,
           "U'''": Single3, 'U"""': Double3,
           'r': None, 'R': None, 'b': None, 'B': None,
           'u': None, 'U': None}

triple_quoted = {}
for t in ("'''", '"""',
          "r'''", 'r"""', "R'''", 'R"""',
          "b'''", 'b"""', "B'''", 'B"""',
          "br'''", 'br"""', "Br'''", 'Br"""',
          "bR'''", 'bR"""', "BR'''", 'BR"""',
          "rb'''", 'rb"""', "rB'''", 'rB"""',
          "Rb'''", 'Rb"""', "RB'''", 'RB"""',
          "u'''", 'u"""', "U'''", 'U"""',
          ):
    triple_quoted[t] = t
single_quoted = {}
for t in ("'", '"',
          "r'", 'r"', "R'", 'R"',
          "b'", 'b"', "B'", 'B"',
          "br'", 'br"', "Br'", 'Br"',
          "bR'", 'bR"', "BR'", 'BR"' ,
          "rb'", 'rb"', "rB'", 'rB"',
          "Rb'", 'Rb"', "RB'", 'RB"' ,
          "u'", 'u"', "U'", 'U"',
          ):
    single_quoted[t] = t

tabsize = 8

class TokenError(Exception): pass

class StopTokenizing(Exception): pass


class Untokenizer:

    def __init__(self):
        self.tokens = []
        self.prev_row = 1
        self.prev_col = 0
        self.encoding = None

    def add_whitespace(self, start):
        row, col = start
        if row < self.prev_row or row == self.prev_row and col < self.prev_col:
            raise ValueError("start ({},{}) precedes previous end ({},{})"
                             .format(row, col, self.prev_row, self.prev_col))
        row_offset = row - self.prev_row
        if row_offset:
            self.tokens.append("\\\n" * row_offset)
            self.prev_col = 0
        col_offset = col - self.prev_col
        if col_offset:
            self.tokens.append(" " * col_offset)

    def untokenize(self, iterable):
        it = iter(iterable)
        indents = []
        startline = False
        for t in it:
            if len(t) == 2:
                self.compat(t, it)
                break
            tok_type, token, start, end, line = t
            if tok_type == ENCODING:
                self.encoding = token
                continue
            if tok_type == ENDMARKER:
                break
            if tok_type == INDENT:
                indents.append(token)
                continue
            elif tok_type == DEDENT:
                indents.pop()
                self.prev_row, self.prev_col = end
                continue
            elif tok_type in (NEWLINE, NL):
                startline = True
            elif startline and indents:
                indent = indents[-1]
                if start[1] >= len(indent):
                    self.tokens.append(indent)
                    self.prev_col = len(indent)
                startline = False
            self.add_whitespace(start)
            self.tokens.append(token)
            self.prev_row, self.prev_col = end
            if tok_type in (NEWLINE, NL):
                self.prev_row += 1
                self.prev_col = 0
        return "".join(self.tokens)

    def compat(self, token, iterable):
        indents = []
        toks_append = self.tokens.append
        startline = token[0] in (NEWLINE, NL)
        prevstring = False

        for tok in chain([token], iterable):
            toknum, tokval = tok[:2]
            if toknum == ENCODING:
                self.encoding = tokval
                continue

            if toknum in (NAME, NUMBER, ASYNC, AWAIT):
                tokval += ' '

            # Insert a space between two consecutive strings
            if toknum == STRING:
                if prevstring:
                    tokval = ' ' + tokval
                prevstring = True
            else:
                prevstring = False

            if toknum == INDENT:
                indents.append(tokval)
                continue
            elif toknum == DEDENT:
                indents.pop()
                continue
            elif toknum in (NEWLINE, NL):
                startline = True
            elif startline and indents:
                toks_append(indents[-1])
                startline = False
            toks_append(tokval)


def untokenize(iterable):
    """Transform tokens back into Python source code.
    It returns a bytes object, encoded using the ENCODING
    token, which is the first token sequence output by tokenize.

    Each element returned by the iterable must be a token sequence
    with at least two elements, a token number and token value.  If
    only two tokens are passed, the resulting output is poor.

    Round-trip invariant for full input:
        Untokenized source will match input source exactly

    Round-trip invariant for limited input:
        # Output bytes will tokenize back to the input
        t1 = [tok[:2] for tok in tokenize(f.readline)]
        newcode = untokenize(t1)
        readline = BytesIO(newcode).readline
        t2 = [tok[:2] for tok in tokenize(readline)]
        assert t1 == t2
    """
    ut = Untokenizer()
    out = ut.untokenize(iterable)
    if ut.encoding is not None:
        out = out.encode(ut.encoding)
    return out


def _get_normal_name(orig_enc):
    """Imitates get_normal_name in tokenizer.c."""
    # Only care about the first 12 characters.
    enc = orig_enc[:12].lower().replace("_", "-")
    if enc == "utf-8" or enc.startswith("utf-8-"):
        return "utf-8"
    if enc in ("latin-1", "iso-8859-1", "iso-latin-1") or \
       enc.startswith(("latin-1-", "iso-8859-1-", "iso-latin-1-")):
        return "iso-8859-1"
    return orig_enc

def detect_encoding(readline):
    """
    The detect_encoding() function is used to detect the encoding that should
    be used to decode a Python source file.  It requires one argument, readline,
    in the same way as the tokenize() generator.

    It will call readline a maximum of twice, and return the encoding used
    (as a string) and a list of any lines (left as bytes) it has read in.

    It detects the encoding from the presence of a utf-8 bom or an encoding
    cookie as specified in pep-0263.  If both a bom and a cookie are present,
    but disagree, a SyntaxError will be raised.  If the encoding cookie is an
    invalid charset, raise a SyntaxError.  Note that if a utf-8 bom is found,
    'utf-8-sig' is returned.

    If no encoding is specified, then the default of 'utf-8' will be returned.
    """
    try:
        filename = readline.__self__.name
    except AttributeError:
        filename = None
    bom_found = False
    encoding = None
    default = 'utf-8'
    def read_or_stop():
        try:
            return readline()
        except StopIteration:
            return b''

    def find_cookie(line):
        try:
            # Decode as UTF-8. Either the line is an encoding declaration,
            # in which case it should be pure ASCII, or it must be UTF-8
            # per default encoding.
            line_string = line.decode('utf-8')
        except UnicodeDecodeError:
            msg = "invalid or missing encoding declaration"
            if filename is not None:
                msg = '{} for {!r}'.format(msg, filename)
            raise SyntaxError(msg)

        match = cookie_re.match(line_string)
        if not match:
            return None
        encoding = _get_normal_name(match.group(1))
        try:
            codec = lookup(encoding)
        except LookupError:
            # This behaviour mimics the Python interpreter
            if filename is None:
                msg = "unknown encoding: " + encoding
            else:
                msg = "unknown encoding for {!r}: {}".format(filename,
                        encoding)
            raise SyntaxError(msg)

        if bom_found:
            if encoding != 'utf-8':
                # This behaviour mimics the Python interpreter
                if filename is None:
                    msg = 'encoding problem: utf-8'
                else:
                    msg = 'encoding problem for {!r}: utf-8'.format(filename)
                raise SyntaxError(msg)
            encoding += '-sig'
        return encoding

    first = read_or_stop()
    if first.startswith(BOM_UTF8):
        bom_found = True
        first = first[3:]
        default = 'utf-8-sig'
    if not first:
        return default, []

    encoding = find_cookie(first)
    if encoding:
        return encoding, [first]
    if not blank_re.match(first):
        return default, [first]

    second = read_or_stop()
    if not second:
        return default, [first]

    encoding = find_cookie(second)
    if encoding:
        return encoding, [first, second]

    return default, [first, second]


def open(filename):
    """Open a file in read only mode using the encoding detected by
    detect_encoding().
    """
    buffer = _builtin_open(filename, 'rb')
    try:
        encoding, lines = detect_encoding(buffer.readline)
        buffer.seek(0)
        text = TextIOWrapper(buffer, encoding, line_buffering=True)
        text.mode = 'r'
        return text
    except:
        buffer.close()
        raise


def tokenize(readline):
    """
    The tokenize() generator requires one argument, readline, which
    must be a callable object which provides the same interface as the
    readline() method of built-in file objects.  Each call to the function
    should return one line of input as bytes.  Alternatively, readline
    can be a callable function terminating with StopIteration:
        readline = open(myfile, 'rb').__next__  # Example of alternate readline

    The generator produces 5-tuples with these members: the token type; the
    token string; a 2-tuple (srow, scol) of ints specifying the row and
    column where the token begins in the source; a 2-tuple (erow, ecol) of
    ints specifying the row and column where the token ends in the source;
    and the line on which the token was found.  The line passed is the
    logical line; continuation lines are included.

    The first token sequence will always be an ENCODING token
    which tells you which encoding was used to decode the bytes stream.
    """
    # This import is here to avoid problems when the itertools module is not
    # built yet and tokenize is imported.
    from itertools import chain, repeat
    encoding, consumed = detect_encoding(readline)
    rl_gen = iter(readline, b"")
    empty = repeat(b"")
    return _tokenize(chain(consumed, rl_gen, empty).__next__, encoding)


def _tokenize(readline, encoding):
    lnum = parenlev = continued = 0
    numchars = '0123456789'
    contstr, needcont = '', 0
    contline = None
    indents = [0]

    # 'stashed' and 'async_*' are used for async/await parsing
    stashed = None
    async_def = False
    async_def_indent = 0
    async_def_nl = False

    if encoding is not None:
        if encoding == "utf-8-sig":
            # BOM will already have been stripped.
            encoding = "utf-8"
        yield TokenInfo(ENCODING, encoding, (0, 0), (0, 0), '')
    while True:             # loop over lines in stream
        try:
            line = readline()
        except StopIteration:
            line = b''

        if encoding is not None:
            line = line.decode(encoding)
        lnum += 1
        pos, max = 0, len(line)

        if contstr:                            # continued string
            if not line:
                raise TokenError("EOF in multi-line string", strstart)
            endmatch = endprog.match(line)
            if endmatch:
                pos = end = endmatch.end(0)
                yield TokenInfo(STRING, contstr + line[:end],
                       strstart, (lnum, end), contline + line)
                contstr, needcont = '', 0
                contline = None
            elif needcont and line[-2:] != '\\\n' and line[-3:] != '\\\r\n':
                yield TokenInfo(ERRORTOKEN, contstr + line,
                           strstart, (lnum, len(line)), contline)
                contstr = ''
                contline = None
                continue
            else:
                contstr = contstr + line
                contline = contline + line
                continue

        elif parenlev == 0 and not continued:  # new statement
            if not line: break
            column = 0
            while pos < max:                   # measure leading whitespace
                if line[pos] == ' ':
                    column += 1
                elif line[pos] == '\t':
                    column = (column//tabsize + 1)*tabsize
                elif line[pos] == '\f':
                    column = 0
                else:
                    break
                pos += 1
            if pos == max:
                break

            if line[pos] in '#\r\n':           # skip comments or blank lines
                if line[pos] == '#':
                    comment_token = line[pos:].rstrip('\r\n')
                    nl_pos = pos + len(comment_token)
                    yield TokenInfo(COMMENT, comment_token,
                           (lnum, pos), (lnum, pos + len(comment_token)), line)
                    yield TokenInfo(NL, line[nl_pos:],
                           (lnum, nl_pos), (lnum, len(line)), line)
                else:
                    yield TokenInfo((NL, COMMENT)[line[pos] == '#'], line[pos:],
                           (lnum, pos), (lnum, len(line)), line)
                continue

            if column > indents[-1]:           # count indents or dedents
                indents.append(column)
                yield TokenInfo(INDENT, line[:pos], (lnum, 0), (lnum, pos), line)
            while column < indents[-1]:
                if column not in indents:
                    raise IndentationError(
                        "unindent does not match any outer indentation level",
                        ("<tokenize>", lnum, pos, line))
                indents = indents[:-1]

                if async_def and async_def_indent >= indents[-1]:
                    async_def = False
                    async_def_nl = False
                    async_def_indent = 0

                yield TokenInfo(DEDENT, '', (lnum, pos), (lnum, pos), line)

            if async_def and async_def_nl and async_def_indent >= indents[-1]:
                async_def = False
                async_def_nl = False
                async_def_indent = 0

        else:                                  # continued statement
            if not line:
                raise TokenError("EOF in multi-line statement", (lnum, 0))
            continued = 0

        while pos < max:
            pseudomatch = _compile(PseudoToken).match(line, pos)
            if pseudomatch:                                # scan for tokens
                start, end = pseudomatch.span(1)
                spos, epos, pos = (lnum, start), (lnum, end), end
                if start == end:
                    continue
                token, initial = line[start:end], line[start]

                if (initial in numchars or                  # ordinary number
                    (initial == '.' and token != '.' and token != '...')):
                    yield TokenInfo(NUMBER, token, spos, epos, line)
                elif initial in '\r\n':
                    if stashed:
                        yield stashed
                        stashed = None
                    if parenlev > 0:
                        yield TokenInfo(NL, token, spos, epos, line)
                    else:
                        yield TokenInfo(NEWLINE, token, spos, epos, line)
                        if async_def:
                            async_def_nl = True

                elif initial == '#':
                    assert not token.endswith("\n")
                    if stashed:
                        yield stashed
                        stashed = None
                    yield TokenInfo(COMMENT, token, spos, epos, line)
                elif token in triple_quoted:
                    endprog = _compile(endpats[token])
                    endmatch = endprog.match(line, pos)
                    if endmatch:                           # all on one line
                        pos = endmatch.end(0)
                        token = line[start:pos]
                        yield TokenInfo(STRING, token, spos, (lnum, pos), line)
                    else:
                        strstart = (lnum, start)           # multiple lines
                        contstr = line[start:]
                        contline = line
                        break
                elif initial in single_quoted or \
                    token[:2] in single_quoted or \
                    token[:3] in single_quoted:
                    if token[-1] == '\n':                  # continued string
                        strstart = (lnum, start)
                        endprog = _compile(endpats[initial] or
                                           endpats[token[1]] or
                                           endpats[token[2]])
                        contstr, needcont = line[start:], 1
                        contline = line
                        break
                    else:                                  # ordinary string
                        yield TokenInfo(STRING, token, spos, epos, line)
                elif initial.isidentifier():               # ordinary name
                    if token in ('async', 'await'):
                        if async_def:
                            yield TokenInfo(
                                ASYNC if token == 'async' else AWAIT,
                                token, spos, epos, line)
                            continue

                    tok = TokenInfo(NAME, token, spos, epos, line)
                    if token == 'async' and not stashed:
                        stashed = tok
                        continue

                    if token == 'def':
                        if (stashed
                                and stashed.type == NAME
                                and stashed.string == 'async'):

                            async_def = True
                            async_def_indent = indents[-1]

                            yield TokenInfo(ASYNC, stashed.string,
                                            stashed.start, stashed.end,
                                            stashed.line)
                            stashed = None

                    if stashed:
                        yield stashed
                        stashed = None

                    yield tok
                elif initial == '\\':                      # continued stmt
                    continued = 1
                else:
                    if initial in '([{':
                        parenlev += 1
                    elif initial in ')]}':
                        parenlev -= 1
                    if stashed:
                        yield stashed
                        stashed = None
                    yield TokenInfo(OP, token, spos, epos, line)
            else:
                yield TokenInfo(ERRORTOKEN, line[pos],
                           (lnum, pos), (lnum, pos+1), line)
                pos += 1

    if stashed:
        yield stashed
        stashed = None

    for indent in indents[1:]:                 # pop remaining indent levels
        yield TokenInfo(DEDENT, '', (lnum, 0), (lnum, 0), '')
    yield TokenInfo(ENDMARKER, '', (lnum, 0), (lnum, 0), '')


# An undocumented, backwards compatible, API for all the places in the standard
# library that expect to be able to use tokenize with strings
def generate_tokens(readline):
    return _tokenize(readline, None)

def main():
    import argparse

    # Helper error handling routines
    def perror(message):
        print(message, file=sys.stderr)

    def error(message, filename=None, location=None):
        if location:
            args = (filename,) + location + (message,)
            perror("%s:%d:%d: error: %s" % args)
        elif filename:
            perror("%s: error: %s" % (filename, message))
        else:
            perror("error: %s" % message)
        sys.exit(1)

    # Parse the arguments and options
    parser = argparse.ArgumentParser(prog='python -m tokenize')
    parser.add_argument(dest='filename', nargs='?',
                        metavar='filename.py',
                        help='the file to tokenize; defaults to stdin')
    parser.add_argument('-e', '--exact', dest='exact', action='store_true',
                        help='display token names using the exact type')
    args = parser.parse_args()

    try:
        # Tokenize the input
        if args.filename:
            filename = args.filename
            with _builtin_open(filename, 'rb') as f:
                tokens = list(tokenize(f.readline))
        else:
            filename = "<stdin>"
            tokens = _tokenize(sys.stdin.readline, None)

        # Output the tokenization
        for token in tokens:
            token_type = token.type
            if args.exact:
                token_type = token.exact_type
            token_range = "%d,%d-%d,%d:" % (token.start + token.end)
            print("%-20s%-15s%-15r" %
                  (token_range, tok_name[token_type], token.string))
    except IndentationError as err:
        line, column = err.args[1][1:3]
        error(err.args[0], filename, (line, column))
    except TokenError as err:
        line, column = err.args[1]
        error(err.args[0], filename, (line, column))
    except SyntaxError as err:
        error(err, filename)
    except OSError as err:
        error(err)
    except KeyboardInterrupt:
        print("interrupted\n")
    except Exception as err:
        perror("unexpected error: %s" % err)
        raise

if __name__ == "__main__":
    main()

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
August 12 2024 08:39:02
root / root
0755
__pycache__
--
August 12 2024 08:39:02
root / linksafe
0755
asyncio
--
August 12 2024 08:39:02
root / linksafe
0755
collections
--
August 12 2024 08:39:02
root / linksafe
0755
concurrent
--
August 12 2024 08:39:02
root / linksafe
0755
config-3.5m
--
August 12 2024 08:39:22
root / linksafe
0755
ctypes
--
August 12 2024 08:39:02
root / linksafe
0755
curses
--
August 12 2024 08:39:02
root / linksafe
0755
dbm
--
August 12 2024 08:39:02
root / linksafe
0755
distutils
--
August 12 2024 08:39:02
root / linksafe
0755
email
--
August 12 2024 08:39:02
root / linksafe
0755
encodings
--
August 12 2024 08:39:02
root / linksafe
0755
ensurepip
--
August 12 2024 08:39:02
root / linksafe
0755
html
--
August 12 2024 08:39:02
root / linksafe
0755
http
--
August 12 2024 08:39:02
root / linksafe
0755
idlelib
--
August 12 2024 08:39:02
root / linksafe
0755
importlib
--
August 12 2024 08:39:02
root / linksafe
0755
json
--
August 12 2024 08:39:02
root / linksafe
0755
lib-dynload
--
August 12 2024 08:39:02
root / linksafe
0755
lib2to3
--
August 12 2024 08:39:02
root / linksafe
0755
logging
--
August 12 2024 08:39:02
root / linksafe
0755
multiprocessing
--
August 12 2024 08:39:02
root / linksafe
0755
plat-linux
--
August 12 2024 08:39:02
root / linksafe
0755
pydoc_data
--
August 12 2024 08:39:02
root / linksafe
0755
site-packages
--
August 12 2024 08:39:02
root / linksafe
0755
sqlite3
--
August 12 2024 08:39:02
root / linksafe
0755
test
--
August 12 2024 08:39:02
root / linksafe
0755
unittest
--
August 12 2024 08:39:02
root / linksafe
0755
urllib
--
August 12 2024 08:39:02
root / linksafe
0755
venv
--
August 12 2024 08:39:02
root / linksafe
0755
wsgiref
--
August 12 2024 08:39:02
root / linksafe
0755
xml
--
August 12 2024 08:39:02
root / linksafe
0755
xmlrpc
--
August 12 2024 08:39:02
root / linksafe
0755
__future__.py
4.728 KB
May 31 2024 13:51:46
root / linksafe
0644
__phello__.foo.py
0.063 KB
May 31 2024 13:51:44
root / linksafe
0644
_bootlocale.py
1.271 KB
May 31 2024 13:51:40
root / linksafe
0644
_collections_abc.py
24.213 KB
May 31 2024 13:51:40
root / linksafe
0644
_compat_pickle.py
8.355 KB
May 31 2024 13:51:43
root / linksafe
0644
_compression.py
5.215 KB
May 31 2024 13:51:41
root / linksafe
0644
_dummy_thread.py
4.998 KB
May 31 2024 13:51:44
root / linksafe
0644
_markupbase.py
14.256 KB
May 31 2024 13:51:40
root / linksafe
0644
_osx_support.py
18.667 KB
May 31 2024 13:51:44
root / linksafe
0644
_pydecimal.py
223.27 KB
May 31 2024 13:51:40
root / linksafe
0644
_pyio.py
85.906 KB
May 31 2024 13:51:41
root / linksafe
0644
_sitebuiltins.py
3.042 KB
May 31 2024 13:51:41
root / linksafe
0644
_strptime.py
21.665 KB
May 31 2024 13:51:45
root / linksafe
0644
_sysconfigdata.py
26.319 KB
May 31 2024 13:51:44
root / linksafe
0644
_threading_local.py
7.236 KB
May 31 2024 13:51:40
root / linksafe
0644
_weakrefset.py
5.571 KB
May 31 2024 13:51:40
root / linksafe
0644
abc.py
8.426 KB
May 31 2024 13:51:40
root / linksafe
0644
aifc.py
31.218 KB
May 31 2024 13:51:45
root / linksafe
0644
antigravity.py
0.465 KB
May 31 2024 13:51:40
root / linksafe
0644
argparse.py
88.025 KB
May 31 2024 13:51:44
root / linksafe
0644
ast.py
11.72 KB
May 31 2024 13:51:44
root / linksafe
0644
asynchat.py
11.69 KB
May 31 2024 13:51:44
root / linksafe
0644
asyncore.py
19.633 KB
May 31 2024 13:51:46
root / linksafe
0644
base64.py
20.041 KB
May 31 2024 13:51:40
root / linksafe
0755
bdb.py
22.807 KB
May 31 2024 13:51:43
root / linksafe
0644
binhex.py
13.627 KB
May 31 2024 13:51:40
root / linksafe
0644
bisect.py
2.534 KB
May 31 2024 13:51:40
root / linksafe
0644
bz2.py
12.133 KB
May 31 2024 13:51:44
root / linksafe
0644
cProfile.py
5.199 KB
May 31 2024 13:51:40
root / linksafe
0755
calendar.py
22.459 KB
May 31 2024 13:51:44
root / linksafe
0644
cgi.py
35.201 KB
May 31 2024 13:51:44
root / linksafe
0755
cgitb.py
11.741 KB
May 31 2024 13:51:46
root / linksafe
0644
chunk.py
5.298 KB
May 31 2024 13:51:41
root / linksafe
0644
cmd.py
14.512 KB
May 31 2024 13:51:40
root / linksafe
0644
code.py
9.881 KB
May 31 2024 13:51:40
root / linksafe
0644
codecs.py
35.382 KB
May 31 2024 13:51:40
root / linksafe
0644
codeop.py
5.854 KB
May 31 2024 13:51:40
root / linksafe
0644
colorsys.py
3.969 KB
May 31 2024 13:51:40
root / linksafe
0644
compileall.py
11.437 KB
May 31 2024 13:51:40
root / linksafe
0644
configparser.py
52.199 KB
May 31 2024 13:51:40
root / linksafe
0644
contextlib.py
12.159 KB
May 31 2024 13:51:40
root / linksafe
0644
copy.py
8.736 KB
May 31 2024 13:51:40
root / linksafe
0644
copyreg.py
6.673 KB
May 31 2024 13:51:44
root / linksafe
0644
crypt.py
1.835 KB
May 31 2024 13:51:40
root / linksafe
0644
csv.py
15.75 KB
May 31 2024 13:51:40
root / linksafe
0644
datetime.py
74.12 KB
May 31 2024 13:51:46
root / linksafe
0644
decimal.py
0.313 KB
May 31 2024 13:51:44
root / linksafe
0644
difflib.py
82.23 KB
May 31 2024 13:51:41
root / linksafe
0644
dis.py
16.943 KB
May 31 2024 13:51:40
root / linksafe
0644
doctest.py
101.598 KB
May 31 2024 13:51:40
root / linksafe
0644
dummy_threading.py
2.749 KB
May 31 2024 13:51:40
root / linksafe
0644
enum.py
21.705 KB
May 31 2024 13:51:40
root / linksafe
0644
filecmp.py
9.6 KB
May 31 2024 13:51:40
root / linksafe
0644
fileinput.py
13.925 KB
May 31 2024 13:51:41
root / linksafe
0644
fnmatch.py
3.089 KB
May 31 2024 13:51:40
root / linksafe
0644
formatter.py
14.788 KB
May 31 2024 13:51:40
root / linksafe
0644
fractions.py
24.035 KB
May 31 2024 13:51:40
root / linksafe
0644
ftplib.py
34.132 KB
May 31 2024 13:51:40
root / linksafe
0644
functools.py
28.266 KB
May 31 2024 13:51:46
root / linksafe
0644
genericpath.py
4.262 KB
May 31 2024 13:51:46
root / linksafe
0644
getopt.py
7.313 KB
May 31 2024 13:51:44
root / linksafe
0644
getpass.py
5.854 KB
May 31 2024 13:51:40
root / linksafe
0644
gettext.py
21.025 KB
May 31 2024 13:51:44
root / linksafe
0644
glob.py
4.953 KB
May 31 2024 13:51:40
root / linksafe
0644
gzip.py
19.785 KB
May 31 2024 13:51:44
root / linksafe
0644
hashlib.py
7.792 KB
May 31 2024 13:51:46
root / linksafe
0644
heapq.py
22.392 KB
May 31 2024 13:51:40
root / linksafe
0644
hmac.py
4.944 KB
May 31 2024 13:51:41
root / linksafe
0644
imaplib.py
50.96 KB
May 31 2024 13:51:44
root / linksafe
0644
imghdr.py
3.67 KB
May 31 2024 13:51:44
root / linksafe
0644
imp.py
10.426 KB
May 31 2024 13:51:40
root / linksafe
0644
inspect.py
111.522 KB
May 31 2024 13:51:43
root / linksafe
0644
io.py
3.316 KB
May 31 2024 13:51:40
root / linksafe
0644
ipaddress.py
73.958 KB
May 31 2024 13:51:44
root / linksafe
0644
keyword.py
2.17 KB
May 31 2024 13:51:44
root / linksafe
0755
linecache.py
5.188 KB
May 31 2024 13:51:40
root / linksafe
0644
locale.py
72.962 KB
May 31 2024 13:51:44
root / linksafe
0644
lzma.py
12.622 KB
May 31 2024 13:51:45
root / linksafe
0644
macpath.py
5.769 KB
May 31 2024 13:51:40
root / linksafe
0644
macurl2path.py
2.668 KB
May 31 2024 13:51:40
root / linksafe
0644
mailbox.py
76.58 KB
May 31 2024 13:51:43
root / linksafe
0644
mailcap.py
7.914 KB
May 31 2024 13:51:40
root / linksafe
0644
mimetypes.py
20.358 KB
May 31 2024 13:51:44
root / linksafe
0644
modulefinder.py
22.544 KB
May 31 2024 13:51:40
root / linksafe
0644
netrc.py
5.613 KB
May 31 2024 13:51:41
root / linksafe
0644
nntplib.py
42.068 KB
May 31 2024 13:51:40
root / linksafe
0644
ntpath.py
22.259 KB
May 31 2024 13:51:40
root / linksafe
0644
nturl2path.py
2.387 KB
May 31 2024 13:51:44
root / linksafe
0644
numbers.py
10.003 KB
May 31 2024 13:51:45
root / linksafe
0644
opcode.py
5.747 KB
May 31 2024 13:51:46
root / linksafe
0644
operator.py
10.608 KB
May 31 2024 13:51:44
root / linksafe
0644
optparse.py
58.93 KB
May 31 2024 13:51:44
root / linksafe
0644
os.py
36.165 KB
May 31 2024 13:51:40
root / linksafe
0644
pathlib.py
45.899 KB
May 31 2024 13:51:44
root / linksafe
0644
pdb.py
59.716 KB
May 31 2024 13:51:40
root / linksafe
0755
pickle.py
54.859 KB
May 31 2024 13:51:41
root / linksafe
0644
pickletools.py
89.61 KB
May 31 2024 13:51:40
root / linksafe
0644
pipes.py
8.707 KB
May 31 2024 13:51:44
root / linksafe
0644
pkgutil.py
20.854 KB
May 31 2024 13:51:40
root / linksafe
0644
platform.py
45.065 KB
May 31 2024 13:51:40
root / linksafe
0755
plistlib.py
31.064 KB
May 31 2024 13:51:40
root / linksafe
0644
poplib.py
14.372 KB
May 31 2024 13:51:40
root / linksafe
0644
posixpath.py
14.562 KB
May 31 2024 13:51:40
root / linksafe
0644
pprint.py
20.371 KB
May 31 2024 13:51:40
root / linksafe
0644
profile.py
21.516 KB
May 31 2024 13:51:41
root / linksafe
0755
pstats.py
25.941 KB
May 31 2024 13:51:40
root / linksafe
0644
pty.py
4.651 KB
May 31 2024 13:51:40
root / linksafe
0644
py_compile.py
7.013 KB
May 31 2024 13:51:44
root / linksafe
0644
pyclbr.py
13.246 KB
May 31 2024 13:51:39
root / linksafe
0644
pydoc.py
101.223 KB
May 31 2024 13:51:40
root / linksafe
0755
queue.py
8.574 KB
May 31 2024 13:51:44
root / linksafe
0644
quopri.py
7.095 KB
May 31 2024 13:51:44
root / linksafe
0755
random.py
25.843 KB
May 31 2024 13:51:40
root / linksafe
0644
re.py
15.138 KB
May 31 2024 13:51:40
root / linksafe
0644
reprlib.py
5.211 KB
May 31 2024 13:51:40
root / linksafe
0644
rlcompleter.py
6.159 KB
May 31 2024 13:51:46
root / linksafe
0644
runpy.py
11.679 KB
May 31 2024 13:51:40
root / linksafe
0644
sched.py
6.07 KB
May 31 2024 13:51:44
root / linksafe
0644
selectors.py
18.982 KB
May 31 2024 13:51:40
root / linksafe
0644
shelve.py
8.328 KB
May 31 2024 13:51:44
root / linksafe
0644
shlex.py
11.18 KB
May 31 2024 13:51:46
root / linksafe
0644
shutil.py
39.109 KB
May 31 2024 13:51:44
root / linksafe
0644
signal.py
2.073 KB
May 31 2024 13:51:44
root / linksafe
0644
site.py
21.005 KB
May 31 2024 13:51:43
root / linksafe
0644
smtpd.py
34.544 KB
May 31 2024 13:51:40
root / linksafe
0755
smtplib.py
42.612 KB
May 31 2024 13:51:40
root / linksafe
0755
sndhdr.py
6.268 KB
May 31 2024 13:51:44
root / linksafe
0644
socket.py
26.499 KB
May 31 2024 13:51:45
root / linksafe
0644
socketserver.py
24.088 KB
May 31 2024 13:51:46
root / linksafe
0644
sre_compile.py
17.979 KB
May 31 2024 13:51:40
root / linksafe
0644
sre_constants.py
6.661 KB
May 31 2024 13:51:40
root / linksafe
0644
sre_parse.py
34.294 KB
May 31 2024 13:51:40
root / linksafe
0644
ssl.py
41.359 KB
May 31 2024 13:51:44
root / linksafe
0644
stat.py
4.92 KB
May 31 2024 13:51:44
root / linksafe
0644
statistics.py
19.075 KB
May 31 2024 13:51:40
root / linksafe
0644
string.py
11.576 KB
May 31 2024 13:51:44
root / linksafe
0644
stringprep.py
12.614 KB
May 31 2024 13:51:41
root / linksafe
0644
struct.py
0.251 KB
May 31 2024 13:51:40
root / linksafe
0644
subprocess.py
57.531 KB
May 31 2024 13:51:40
root / linksafe
0644
sunau.py
17.671 KB
May 31 2024 13:51:40
root / linksafe
0644
symbol.py
2.057 KB
May 31 2024 13:51:40
root / linksafe
0755
symtable.py
7.022 KB
May 31 2024 13:51:44
root / linksafe
0644
sysconfig.py
23.889 KB
May 31 2024 13:51:44
root / linksafe
0644
tabnanny.py
11.146 KB
May 31 2024 13:51:44
root / linksafe
0755
tarfile.py
90.889 KB
May 31 2024 13:51:40
root / linksafe
0755
telnetlib.py
22.477 KB
May 31 2024 13:51:40
root / linksafe
0644
tempfile.py
26.012 KB
May 31 2024 13:51:40
root / linksafe
0644
textwrap.py
19.1 KB
May 31 2024 13:51:40
root / linksafe
0644
this.py
0.979 KB
May 31 2024 13:51:41
root / linksafe
0644
threading.py
47.878 KB
May 31 2024 13:51:44
root / linksafe
0644
timeit.py
12.112 KB
May 31 2024 13:51:40
root / linksafe
0755
token.py
3.003 KB
May 31 2024 13:51:40
root / linksafe
0644
tokenize.py
27.139 KB
May 31 2024 13:51:44
root / linksafe
0644
trace.py
30.813 KB
May 31 2024 13:51:40
root / linksafe
0755
traceback.py
21.655 KB
May 31 2024 13:51:44
root / linksafe
0644
tracemalloc.py
15.274 KB
May 31 2024 13:51:44
root / linksafe
0644
tty.py
0.858 KB
May 31 2024 13:51:40
root / linksafe
0644
types.py
8.593 KB
May 31 2024 13:51:40
root / linksafe
0644
typing.py
78.257 KB
May 31 2024 13:51:44
root / linksafe
0644
uu.py
6.607 KB
May 31 2024 13:51:40
root / linksafe
0755
uuid.py
22.716 KB
May 31 2024 13:51:40
root / linksafe
0644
warnings.py
15.479 KB
May 31 2024 13:51:40
root / linksafe
0644
wave.py
17.268 KB
May 31 2024 13:51:40
root / linksafe
0644
weakref.py
19.986 KB
May 31 2024 13:51:44
root / linksafe
0644
webbrowser.py
21.316 KB
May 31 2024 13:51:44
root / linksafe
0755
xdrlib.py
5.774 KB
May 31 2024 13:51:46
root / linksafe
0644
zipapp.py
6.989 KB
May 31 2024 13:51:40
root / linksafe
0644
zipfile.py
71.945 KB
May 31 2024 13:51:46
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF