mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
bpo-42955: Add Python/module_names.h (GH-24258)
Add a private list of all stdlib modules: _Py_module_names. * Add Tools/scripts/generate_module_names.py script. * Makefile: Add "make regen-module-names" command. * setup.py: Add --list-module-names option. * GitHub Action and Travis CI also runs "make regen-module-names", not ony "make regen-all", to ensure that the module names remains up to date.
This commit is contained in:
parent
e8e66eab94
commit
cad8020cb8
8 changed files with 592 additions and 18 deletions
336
Python/module_names.h
Normal file
336
Python/module_names.h
Normal file
|
@ -0,0 +1,336 @@
|
|||
// Auto-generated by Tools/scripts/generate_module_names.py.
|
||||
|
||||
static const char* _Py_module_names[] = {
|
||||
|
||||
// Built-in modules
|
||||
"_abc",
|
||||
"_ast",
|
||||
"_codecs",
|
||||
"_collections",
|
||||
"_functools",
|
||||
"_imp",
|
||||
"_io",
|
||||
"_locale",
|
||||
"_operator",
|
||||
"_signal",
|
||||
"_sre",
|
||||
"_stat",
|
||||
"_string",
|
||||
"_symtable",
|
||||
"_thread",
|
||||
"_tracemalloc",
|
||||
"_warnings",
|
||||
"_weakref",
|
||||
"atexit",
|
||||
"builtins",
|
||||
"errno",
|
||||
"faulthandler",
|
||||
"gc",
|
||||
"itertools",
|
||||
"marshal",
|
||||
"posix",
|
||||
"pwd",
|
||||
"sys",
|
||||
"time",
|
||||
|
||||
// Pure Python modules (Lib/*.py)
|
||||
"__future__",
|
||||
"abc",
|
||||
"aifc",
|
||||
"antigravity",
|
||||
"argparse",
|
||||
"ast",
|
||||
"asynchat",
|
||||
"asyncore",
|
||||
"base64",
|
||||
"bdb",
|
||||
"binhex",
|
||||
"bisect",
|
||||
"bz2",
|
||||
"cProfile",
|
||||
"calendar",
|
||||
"cgi",
|
||||
"cgitb",
|
||||
"chunk",
|
||||
"cmd",
|
||||
"code",
|
||||
"codecs",
|
||||
"codeop",
|
||||
"colorsys",
|
||||
"compileall",
|
||||
"configparser",
|
||||
"contextlib",
|
||||
"contextvars",
|
||||
"copy",
|
||||
"copyreg",
|
||||
"crypt",
|
||||
"csv",
|
||||
"dataclasses",
|
||||
"datetime",
|
||||
"decimal",
|
||||
"difflib",
|
||||
"dis",
|
||||
"doctest",
|
||||
"enum",
|
||||
"filecmp",
|
||||
"fileinput",
|
||||
"fnmatch",
|
||||
"fractions",
|
||||
"ftplib",
|
||||
"functools",
|
||||
"genericpath",
|
||||
"getopt",
|
||||
"getpass",
|
||||
"gettext",
|
||||
"glob",
|
||||
"graphlib",
|
||||
"gzip",
|
||||
"hashlib",
|
||||
"heapq",
|
||||
"hmac",
|
||||
"imaplib",
|
||||
"imghdr",
|
||||
"imp",
|
||||
"inspect",
|
||||
"io",
|
||||
"ipaddress",
|
||||
"keyword",
|
||||
"linecache",
|
||||
"locale",
|
||||
"lzma",
|
||||
"mailbox",
|
||||
"mailcap",
|
||||
"mimetypes",
|
||||
"modulefinder",
|
||||
"netrc",
|
||||
"nntplib",
|
||||
"ntpath",
|
||||
"nturl2path",
|
||||
"numbers",
|
||||
"opcode",
|
||||
"operator",
|
||||
"optparse",
|
||||
"os",
|
||||
"pathlib",
|
||||
"pdb",
|
||||
"pickle",
|
||||
"pickletools",
|
||||
"pipes",
|
||||
"pkgutil",
|
||||
"platform",
|
||||
"plistlib",
|
||||
"poplib",
|
||||
"posixpath",
|
||||
"pprint",
|
||||
"profile",
|
||||
"pstats",
|
||||
"pty",
|
||||
"py_compile",
|
||||
"pyclbr",
|
||||
"pydoc",
|
||||
"queue",
|
||||
"quopri",
|
||||
"random",
|
||||
"re",
|
||||
"reprlib",
|
||||
"rlcompleter",
|
||||
"runpy",
|
||||
"sched",
|
||||
"secrets",
|
||||
"selectors",
|
||||
"shelve",
|
||||
"shlex",
|
||||
"shutil",
|
||||
"signal",
|
||||
"site",
|
||||
"smtpd",
|
||||
"smtplib",
|
||||
"sndhdr",
|
||||
"socket",
|
||||
"socketserver",
|
||||
"sre_compile",
|
||||
"sre_constants",
|
||||
"sre_parse",
|
||||
"ssl",
|
||||
"stat",
|
||||
"statistics",
|
||||
"string",
|
||||
"stringprep",
|
||||
"struct",
|
||||
"subprocess",
|
||||
"sunau",
|
||||
"symtable",
|
||||
"sysconfig",
|
||||
"tabnanny",
|
||||
"tarfile",
|
||||
"telnetlib",
|
||||
"tempfile",
|
||||
"textwrap",
|
||||
"this",
|
||||
"threading",
|
||||
"timeit",
|
||||
"token",
|
||||
"tokenize",
|
||||
"trace",
|
||||
"traceback",
|
||||
"tracemalloc",
|
||||
"tty",
|
||||
"turtle",
|
||||
"types",
|
||||
"typing",
|
||||
"uu",
|
||||
"uuid",
|
||||
"warnings",
|
||||
"wave",
|
||||
"weakref",
|
||||
"webbrowser",
|
||||
"xdrlib",
|
||||
"zipapp",
|
||||
"zipfile",
|
||||
"zipimport",
|
||||
|
||||
// Packages and sub-packages
|
||||
"asyncio",
|
||||
"collections",
|
||||
"concurrent",
|
||||
"concurrent.futures",
|
||||
"ctypes",
|
||||
"ctypes.macholib",
|
||||
"curses",
|
||||
"dbm",
|
||||
"distutils",
|
||||
"distutils.command",
|
||||
"email",
|
||||
"email.mime",
|
||||
"encodings",
|
||||
"ensurepip",
|
||||
"ensurepip._bundled",
|
||||
"html",
|
||||
"http",
|
||||
"idlelib",
|
||||
"importlib",
|
||||
"json",
|
||||
"lib2to3",
|
||||
"lib2to3.fixes",
|
||||
"lib2to3.pgen2",
|
||||
"logging",
|
||||
"msilib",
|
||||
"multiprocessing",
|
||||
"multiprocessing.dummy",
|
||||
"pydoc_data",
|
||||
"sqlite3",
|
||||
"tkinter",
|
||||
"turtledemo",
|
||||
"unittest",
|
||||
"urllib",
|
||||
"venv",
|
||||
"wsgiref",
|
||||
"xml",
|
||||
"xml.dom",
|
||||
"xml.etree",
|
||||
"xml.parsers",
|
||||
"xml.sax",
|
||||
"xmlrpc",
|
||||
"zoneinfo",
|
||||
|
||||
// Extension modules built by setup.py
|
||||
"_asyncio",
|
||||
"_bisect",
|
||||
"_blake2",
|
||||
"_bz2",
|
||||
"_codecs_cn",
|
||||
"_codecs_hk",
|
||||
"_codecs_iso2022",
|
||||
"_codecs_jp",
|
||||
"_codecs_kr",
|
||||
"_codecs_tw",
|
||||
"_contextvars",
|
||||
"_crypt",
|
||||
"_csv",
|
||||
"_ctypes",
|
||||
"_curses",
|
||||
"_curses_panel",
|
||||
"_datetime",
|
||||
"_dbm",
|
||||
"_decimal",
|
||||
"_elementtree",
|
||||
"_gdbm",
|
||||
"_hashlib",
|
||||
"_heapq",
|
||||
"_json",
|
||||
"_lsprof",
|
||||
"_lzma",
|
||||
"_md5",
|
||||
"_multibytecodec",
|
||||
"_multiprocessing",
|
||||
"_opcode",
|
||||
"_pickle",
|
||||
"_posixshmem",
|
||||
"_posixsubprocess",
|
||||
"_queue",
|
||||
"_random",
|
||||
"_sha1",
|
||||
"_sha256",
|
||||
"_sha3",
|
||||
"_sha512",
|
||||
"_socket",
|
||||
"_sqlite3",
|
||||
"_ssl",
|
||||
"_statistics",
|
||||
"_struct",
|
||||
"_tkinter",
|
||||
"_uuid",
|
||||
"_xxsubinterpreters",
|
||||
"_zoneinfo",
|
||||
"array",
|
||||
"audioop",
|
||||
"binascii",
|
||||
"cmath",
|
||||
"fcntl",
|
||||
"grp",
|
||||
"math",
|
||||
"mmap",
|
||||
"nis",
|
||||
"ossaudiodev",
|
||||
"pyexpat",
|
||||
"readline",
|
||||
"resource",
|
||||
"select",
|
||||
"spwd",
|
||||
"syslog",
|
||||
"termios",
|
||||
"unicodedata",
|
||||
"zlib",
|
||||
|
||||
// Built-in and extension modules built by Modules/Setup
|
||||
"_abc",
|
||||
"_codecs",
|
||||
"_collections",
|
||||
"_functools",
|
||||
"_io",
|
||||
"_locale",
|
||||
"_operator",
|
||||
"_signal",
|
||||
"_sre",
|
||||
"_stat",
|
||||
"_symtable",
|
||||
"_thread",
|
||||
"_tracemalloc",
|
||||
"_weakref",
|
||||
"atexit",
|
||||
"errno",
|
||||
"faulthandler",
|
||||
"itertools",
|
||||
"posix",
|
||||
"pwd",
|
||||
"time",
|
||||
|
||||
// Windows extension modules
|
||||
"_msi",
|
||||
"_winapi",
|
||||
"msvcrt",
|
||||
"nt",
|
||||
"winreg",
|
||||
"winsound",
|
||||
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue