25 lines
398 B
Python
25 lines
398 B
Python
"""Optional-dependency import guards (readline, fcntl, pty set)."""
|
|||
|
|
|
||
|
|
__all__ = ["readline", "fcntl", "pty", "select", "termios", "tty"]
|
||
|
|
|
||
|
|
|
||
|
|
try:
|
||
|
|
import readline
|
||
|
|
except ImportError:
|
||
|
|
readline = None
|
||
|
|
|
||
|
|
|
||
|
|
try:
|
||
|
|
import fcntl
|
||
|
|
except ImportError:
|
||
|
|
fcntl = None
|
||
|
|
|
||
|
|
|
||
|
|
try:
|
||
|
|
import pty
|
||
|
|
import select
|
||
|
|
import termios
|
||
|
|
import tty
|
||
|
|
except ImportError:
|
||
|
|
pty = select = termios = tty = None
|