diff options
author | Victor Stinner <vstinner@python.org> | 2021-01-19 23:04:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-19 23:04:49 +0100 |
commit | cad8020cb83ec6d904f874c0e4f599e651022196 (patch) | |
tree | 7db4f105af783ecd5ac60488b081d945bcea14b3 /Python | |
parent | e8e66eab941b983b6e85cd0d57cd45838880c568 (diff) | |
download | cpython-cad8020cb83ec6d904f874c0e4f599e651022196.tar.gz cpython-cad8020cb83ec6d904f874c0e4f599e651022196.zip |
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.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/module_names.h | 336 |
1 files changed, 336 insertions, 0 deletions
diff --git a/Python/module_names.h b/Python/module_names.h new file mode 100644 index 00000000000..533a73260ef --- /dev/null +++ b/Python/module_names.h @@ -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", + +}; |