src/eric7/SystemUtilities/SysUtilities.py

branch
eric7
changeset 10046
35b27af462ef
child 10439
21c28b0f9e41
equal deleted inserted replaced
10045:f5c57f8d17a4 10046:35b27af462ef
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2023 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing System related utility functions.
8 """
9
10 import sys
11
12
13 def getStandardModules():
14 """
15 Function to get a list of modules of the standard library.
16
17 @return set of builtin modules
18 @rtype set of str
19 """
20 try:
21 return sys.stdlib_module_names
22 except AttributeError:
23 return {
24 "__future__",
25 "__main__",
26 "_dummy_thread",
27 "_thread",
28 "abc",
29 "aifc",
30 "argparse",
31 "array",
32 "ast",
33 "asynchat",
34 "asyncio",
35 "asyncore",
36 "atexit",
37 "audioop",
38 "base64",
39 "bdb",
40 "binascii",
41 "binhex",
42 "bisect",
43 "builtins",
44 "bz2",
45 "calendar",
46 "cgi",
47 "cgitb",
48 "chunk",
49 "cmath",
50 "cmd",
51 "code",
52 "codecs",
53 "codeop",
54 "collections",
55 "colorsys",
56 "compileall",
57 "concurrent",
58 "configparser",
59 "contextlib",
60 "contextvars",
61 "copy",
62 "copyreg",
63 "cProfile",
64 "crypt",
65 "csv",
66 "ctypes",
67 "curses",
68 "dataclasses",
69 "datetime",
70 "dbm",
71 "decimal",
72 "difflib",
73 "dis",
74 "distutils",
75 "doctest",
76 "dummy_threading",
77 "email",
78 "encodings",
79 "ensurepip",
80 "enum",
81 "errno",
82 "faulthandler",
83 "fcntl",
84 "filecmp",
85 "fileinput",
86 "fnmatch",
87 "formatter",
88 "fractions",
89 "ftplib",
90 "functools",
91 "gc",
92 "getopt",
93 "getpass",
94 "gettext",
95 "glob",
96 "grp",
97 "gzip",
98 "hashlib",
99 "heapq",
100 "hmac",
101 "html",
102 "http",
103 "imaplib",
104 "imghdr",
105 "imp",
106 "importlib",
107 "inspect",
108 "io",
109 "ipaddress",
110 "itertools",
111 "json",
112 "keyword",
113 "lib2to3",
114 "linecache",
115 "locale",
116 "logging",
117 "lzma",
118 "mailbox",
119 "mailcap",
120 "marshal",
121 "math",
122 "mimetypes",
123 "mmap",
124 "modulefinder",
125 "msilib",
126 "msvcrt",
127 "multiprocessing",
128 "netrc",
129 "nis",
130 "nntplib",
131 "numbers",
132 "operator",
133 "optparse",
134 "os",
135 "ossaudiodev",
136 "parser",
137 "pathlib",
138 "pdb",
139 "pickle",
140 "pickletools",
141 "pipes",
142 "pkgutil",
143 "platform",
144 "plistlib",
145 "poplib",
146 "posix",
147 "pprint",
148 "profile",
149 "pstats",
150 "pty",
151 "pwd",
152 "py_compile",
153 "pyclbr",
154 "pydoc",
155 "queue",
156 "quopri",
157 "random",
158 "re",
159 "readline",
160 "reprlib",
161 "resource",
162 "rlcompleter",
163 "runpy",
164 "sched",
165 "secrets",
166 "select",
167 "selectors",
168 "shelve",
169 "shlex",
170 "shutil",
171 "signal",
172 "site",
173 "smtpd",
174 "smtplib",
175 "sndhdr",
176 "socket",
177 "socketserver",
178 "spwd",
179 "sqlite3",
180 "ssl",
181 "stat",
182 "statistics",
183 "string",
184 "stringprep",
185 "struct",
186 "subprocess",
187 "sunau",
188 "symbol",
189 "symtable",
190 "sys",
191 "sysconfig",
192 "syslog",
193 "tabnanny",
194 "tarfile",
195 "telnetlib",
196 "tempfile",
197 "termios",
198 "test",
199 "textwrap",
200 "threading",
201 "time",
202 "timeit",
203 "tkinter",
204 "token",
205 "tokenize",
206 "trace",
207 "traceback",
208 "tracemalloc",
209 "tty",
210 "turtle",
211 "turtledemo",
212 "types",
213 "typing",
214 "unicodedata",
215 "unittest",
216 "urllib",
217 "uu",
218 "uuid",
219 "venv",
220 "warnings",
221 "wave",
222 "weakref",
223 "webbrowser",
224 "winreg",
225 "winsound",
226 "wsgiref",
227 "xdrlib",
228 "xml",
229 "xmlrpc",
230 "zipapp",
231 "zipfile",
232 "zipimport",
233 "zlib",
234 "zoneinfo",
235 }

eric ide

mercurial