�ɲɾ�����ӯ�����һ��ˣ��������С���˴��ͣ�������P���ҹ��ñ˽��ά�Բ��������˸߸ԣ�������ơ��ҹ��ñ�����ά�Բ���ˡ���˳^�ӣ������ӡ� ���ͯj�ӣ��ƺ���ӣ� ? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!usr/lib/python2.7/site-packages/pip/__main__.py000064400000001110152527717570015310 0ustar00from __future__ import absolute_import import os import sys # If we are running from a wheel, add the wheel to sys.path # This allows the usage python pip-*.whl/pip install pip-*.whl if __package__ == '': # __file__ is pip-*.whl/pip/__main__.py # first dirname call strips of '/__main__.py', second strips off '/pip' # Resulting path is the name of the wheel itself # Add that to sys.path so we can import pip path = os.path.dirname(os.path.dirname(__file__)) sys.path.insert(0, path) import pip # noqa if __name__ == '__main__': sys.exit(pip.main()) usr/lib64/python3.12/tkinter/__main__.py000064400000000224152530106760013677 0ustar00"""Main entry point""" import sys if sys.argv[0].endswith("__main__.py"): sys.argv[0] = "python -m tkinter" from . import _test as main main() usr/lib/python3.6/site-packages/pip/__main__.py000064400000001110152531555230015274 0ustar00from __future__ import absolute_import import os import sys # If we are running from a wheel, add the wheel to sys.path # This allows the usage python pip-*.whl/pip install pip-*.whl if __package__ == '': # __file__ is pip-*.whl/pip/__main__.py # first dirname call strips of '/__main__.py', second strips off '/pip' # Resulting path is the name of the wheel itself # Add that to sys.path so we can import pip path = os.path.dirname(os.path.dirname(__file__)) sys.path.insert(0, path) import pip # noqa if __name__ == '__main__': sys.exit(pip.main()) usr/lib64/python3.12/venv/__main__.py000064400000000221152533047320013171 0ustar00import sys from . import main rc = 1 try: main() rc = 0 except Exception as e: print('Error: %s' % e, file=sys.stderr) sys.exit(rc) usr/lib64/python3.12/lib2to3/__main__.py000064400000000103152533047350013473 0ustar00import sys from .main import main sys.exit(main("lib2to3.fixes")) usr/lib64/python3.6/unittest/__main__.py000064400000000745152533273670014041 0ustar00"""Main entry point""" import sys if sys.argv[0].endswith("__main__.py"): import os.path # We change sys.argv[0] to make help message more useful # use executable without path, unquoted # (it's just a hint anyway) # (if you have spaces in your executable you get what you deserve!) executable = os.path.basename(sys.executable) sys.argv[0] = executable + " -m unittest" del os __unittest = True from .main import main, TestProgram main(module=None) usr/lib64/python3.6/lib2to3/__main__.py000064400000000103152533604600013413 0ustar00import sys from .main import main sys.exit(main("lib2to3.fixes")) usr/lib64/python3.12/ensurepip/__main__.py000064400000000130152533610020014215 0ustar00import ensurepip import sys if __name__ == "__main__": sys.exit(ensurepip._main()) usr/lib64/python3.12/sqlite3/__main__.py000064400000007417152534510510013612 0ustar00"""A simple SQLite CLI for the sqlite3 module. Apart from using 'argparse' for the command-line interface, this module implements the REPL as a thin wrapper around the InteractiveConsole class from the 'code' stdlib module. """ import sqlite3 import sys from argparse import ArgumentParser from code import InteractiveConsole from textwrap import dedent def execute(c, sql, suppress_errors=True): """Helper that wraps execution of SQL code. This is used both by the REPL and by direct execution from the CLI. 'c' may be a cursor or a connection. 'sql' is the SQL string to execute. """ try: for row in c.execute(sql): print(row) except sqlite3.Error as e: tp = type(e).__name__ try: print(f"{tp} ({e.sqlite_errorname}): {e}", file=sys.stderr) except AttributeError: print(f"{tp}: {e}", file=sys.stderr) if not suppress_errors: sys.exit(1) class SqliteInteractiveConsole(InteractiveConsole): """A simple SQLite REPL.""" def __init__(self, connection): super().__init__() self._con = connection self._cur = connection.cursor() def runsource(self, source, filename="", symbol="single"): """Override runsource, the core of the InteractiveConsole REPL. Return True if more input is needed; buffering is done automatically. Return False is input is a complete statement ready for execution. """ match source: case ".version": print(f"{sqlite3.sqlite_version}") case ".help": print("Enter SQL code and press enter.") case ".quit": sys.exit(0) case _: if not sqlite3.complete_statement(source): return True execute(self._cur, source) return False def main(*args): parser = ArgumentParser( description="Python sqlite3 CLI", prog="python -m sqlite3", ) parser.add_argument( "filename", type=str, default=":memory:", nargs="?", help=( "SQLite database to open (defaults to ':memory:'). " "A new database is created if the file does not previously exist." ), ) parser.add_argument( "sql", type=str, nargs="?", help=( "An SQL query to execute. " "Any returned rows are printed to stdout." ), ) parser.add_argument( "-v", "--version", action="version", version=f"SQLite version {sqlite3.sqlite_version}", help="Print underlying SQLite library version", ) args = parser.parse_args(*args) if args.filename == ":memory:": db_name = "a transient in-memory database" else: db_name = repr(args.filename) # Prepare REPL banner and prompts. if sys.platform == "win32" and "idlelib.run" not in sys.modules: eofkey = "CTRL-Z" else: eofkey = "CTRL-D" banner = dedent(f""" sqlite3 shell, running on SQLite version {sqlite3.sqlite_version} Connected to {db_name} Each command will be run using execute() on the cursor. Type ".help" for more information; type ".quit" or {eofkey} to quit. """).strip() sys.ps1 = "sqlite> " sys.ps2 = " ... " con = sqlite3.connect(args.filename, isolation_level=None) try: if args.sql: # SQL statement provided on the command-line; execute it directly. execute(con, args.sql, suppress_errors=False) else: # No SQL provided; start the REPL. console = SqliteInteractiveConsole(con) console.interact(banner, exitmsg="") finally: con.close() sys.exit(0) if __name__ == "__main__": main(sys.argv[1:]) usr/lib64/python3.12/zipfile/__main__.py000064400000000072152535754260013673 0ustar00from . import main if __name__ == "__main__": main() usr/lib64/python3.12/asyncio/__main__.py000064400000006643152536360450013703 0ustar00import ast import asyncio import code import concurrent.futures import contextvars import inspect import sys import threading import types import warnings from . import futures class AsyncIOInteractiveConsole(code.InteractiveConsole): def __init__(self, locals, loop): super().__init__(locals) self.compile.compiler.flags |= ast.PyCF_ALLOW_TOP_LEVEL_AWAIT self.loop = loop self.context = contextvars.copy_context() def runcode(self, code): future = concurrent.futures.Future() def callback(): global repl_future global repl_future_interrupted repl_future = None repl_future_interrupted = False func = types.FunctionType(code, self.locals) try: coro = func() except SystemExit: raise except KeyboardInterrupt as ex: repl_future_interrupted = True future.set_exception(ex) return except BaseException as ex: future.set_exception(ex) return if not inspect.iscoroutine(coro): future.set_result(coro) return try: repl_future = self.loop.create_task(coro, context=self.context) futures._chain_future(repl_future, future) except BaseException as exc: future.set_exception(exc) loop.call_soon_threadsafe(callback, context=self.context) try: return future.result() except SystemExit: raise except BaseException: if repl_future_interrupted: self.write("\nKeyboardInterrupt\n") else: self.showtraceback() class REPLThread(threading.Thread): def run(self): try: banner = ( f'asyncio REPL {sys.version} on {sys.platform}\n' f'Use "await" directly instead of "asyncio.run()".\n' f'Type "help", "copyright", "credits" or "license" ' f'for more information.\n' f'{getattr(sys, "ps1", ">>> ")}import asyncio' ) console.interact( banner=banner, exitmsg='exiting asyncio REPL...') finally: warnings.filterwarnings( 'ignore', message=r'^coroutine .* was never awaited$', category=RuntimeWarning) loop.call_soon_threadsafe(loop.stop) if __name__ == '__main__': sys.audit("cpython.run_stdin") loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) repl_locals = {'asyncio': asyncio} for key in {'__name__', '__package__', '__loader__', '__spec__', '__builtins__', '__file__'}: repl_locals[key] = locals()[key] console = AsyncIOInteractiveConsole(repl_locals, loop) repl_future = None repl_future_interrupted = False try: import readline # NoQA except ImportError: pass repl_thread = REPLThread() repl_thread.daemon = True repl_thread.start() while True: try: loop.run_forever() except KeyboardInterrupt: if repl_future and not repl_future.done(): repl_future.cancel() repl_future_interrupted = True continue else: break usr/lib64/python2.7/unittest/__main__.py000064400000000356152537615330014034 0ustar00"""Main entry point""" import sys if sys.argv[0].endswith("__main__.py"): sys.argv[0] = "python -m unittest" __unittest = True from .main import main, TestProgram, USAGE_AS_MAIN TestProgram.USAGE = USAGE_AS_MAIN main(module=None) usr/lib64/python3.6/venv/__main__.py000064400000000221152540001340013102 0ustar00import sys from . import main rc = 1 try: main() rc = 0 except Exception as e: print('Error: %s' % e, file=sys.stderr) sys.exit(rc)