19.3.2 Standard library
The standard library support includes the following:
- <Structure of this section>
(1) List of supported libraries
The following tables list Python libraries provided by the Switch.
Module name |
||||
---|---|---|---|---|
__future__ |
_dummy_thread |
_thread |
abc |
aifc |
argparse |
array |
ast |
asynchat |
asyncore |
atexit |
audioop |
base64 |
bdb |
binascii |
binhex |
bisect |
builtins |
cProfile |
calendar |
cgi |
cmath |
cmd |
code |
codecs |
collections |
colorsys |
compileall |
concurrent |
configparser |
contextlib |
copy |
copyreg |
csv |
datetime |
dbm |
decimal |
difflib |
dis |
distutils |
doctest |
dummy_threading |
|
encodings |
errno |
fcntl |
filecmp |
fnmatch |
fractions |
ftplib |
functools |
gc |
getopt |
getpass |
gettext |
glob |
hashlib |
heapq |
hmac |
html |
http |
imaplib |
imghdr |
imp |
importlib |
inspect |
io |
itertools |
json |
keyword |
lib2to3 |
linecache |
locale |
logging |
macpath |
mailbox |
marshal |
math |
mimetypes |
mmap |
modulefinder |
netrc |
nntplib |
numbers |
operator |
optparse |
os |
parser |
pdb |
pickle |
pickletools |
pipes |
pkgutil |
platform |
plistlib |
poplib |
posixpath |
pprint |
profile |
pstats |
pty |
pwd |
py_compile |
pyclbr |
pydoc |
queue |
quopri |
random |
re |
rlcompleter |
runpy |
sched |
select |
shelve |
shlex |
shutil |
signal |
site |
smtpd |
smtplib |
sndhdr |
socket |
socketserver |
stat |
string |
stringprep |
struct |
sunau |
symtable |
sys |
sysconfig |
tabnanny |
tarfile |
telnetlib |
tempfile |
test |
textwrap |
threading |
time |
timeit |
token |
tokenize |
trace |
traceback |
tty |
types |
unicodedata |
unittest |
urllib |
uu |
uuid |
warnings |
wave |
weakref |
webbrowser |
wsgiref |
xdrlib |
xml |
xmlrpc |
zipfile |
zipimport |
zlib |
- |
- |
- |
Legend:-: Not applicable
(2) Os modular limit
Some of os modules-provided functions have the following limitations:
-
Os.kill limit
The Switch can only send signals to scripts using Python's os.kill() and os.killpg() functions.
-
Os.fork limit
The Switch cannot create subprocesses due to os.fork() and os.forkpty() functions of Python.
-
Os.system limit
The Switch does not guarantee proper operation when programming with os.system() on Python. To execute the program, use commandline module.
(3) Socketserver modular limit
The following socketserver module-provided classes are not supported:
-
ForkingMixIn
-
ForkingUDPServer
-
ForkingTCPServer
(4) Http.server modular limit
The following http.server module-provided classes are not supported:
-
CGIHTTPRequestHandler
(5) User Limits
Although the standard library can be executed only by a superuser, the Switch does not support execution by a superuser.