{
    "mode": "pydoc",
    "parameter": "termios",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/termios/json",
    "generated": "2026-06-02T14:17:40Z",
    "sections": {
        "NAME": {
            "content": "termios\n",
            "subsections": []
        },
        "MODULE REFERENCE": {
            "content": "https://docs.python.org/3.10/library/termios.html\n\nThe following documentation is automatically generated from the Python\nsource files.  It may be incomplete, incorrect or include features that\nare considered implementation detail and may vary between Python\nimplementations.  When in doubt, consult the module reference at the\nlocation listed above.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This module provides an interface to the Posix calls for tty I/O control.\nFor a complete description of these calls, see the Posix or Unix manual\npages. It is only available for those Unix versions that support Posix\ntermios style tty I/O control.\n\nAll functions in this module take a file descriptor fd as their first\nargument. This can be an integer file descriptor, such as returned by\nsys.stdin.fileno(), or a file object, such as sys.stdin itself.\n",
            "subsections": []
        },
        "CLASSES": {
            "content": "builtins.Exception(builtins.BaseException)\nerror\n",
            "subsections": [
                {
                    "name": "class error",
                    "content": "|  Method resolution order:\n|      error\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors defined here:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.Exception:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n"
                }
            ]
        },
        "FUNCTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "tcdrain",
                    "content": "Wait until all output written to file descriptor fd has been transmitted.\n"
                },
                {
                    "name": "tcflow",
                    "content": "Suspend or resume input or output on file descriptor fd.\n\nThe action argument can be termios.TCOOFF to suspend output,\ntermios.TCOON to restart output, termios.TCIOFF to suspend input,\nor termios.TCION to restart input.\n"
                },
                {
                    "name": "tcflush",
                    "content": "Discard queued data on file descriptor fd.\n\nThe queue selector specifies which queue: termios.TCIFLUSH for the input\nqueue, termios.TCOFLUSH for the output queue, or termios.TCIOFLUSH for\nboth queues.\n"
                },
                {
                    "name": "tcgetattr",
                    "content": "Get the tty attributes for file descriptor fd.\n\nReturns a list [iflag, oflag, cflag, lflag, ispeed, ospeed, cc]\nwhere cc is a list of the tty special characters (each a string of\nlength 1, except the items with indices VMIN and VTIME, which are\nintegers when these fields are defined).  The interpretation of the\nflags and the speeds as well as the indexing in the cc array must be\ndone using the symbolic constants defined in this module.\n"
                },
                {
                    "name": "tcsendbreak",
                    "content": "Send a break on file descriptor fd.\n\nA zero duration sends a break for 0.25-0.5 seconds; a nonzero duration\nhas a system dependent meaning.\n"
                },
                {
                    "name": "tcsetattr",
                    "content": "Set the tty attributes for file descriptor fd.\n\nThe attributes to be set are taken from the attributes argument, which\nis a list like the one returned by tcgetattr(). The when argument\ndetermines when the attributes are changed: termios.TCSANOW to\nchange immediately, termios.TCSADRAIN to change after transmitting all\nqueued output, or termios.TCSAFLUSH to change after transmitting all\nqueued output and discarding all queued input.\n"
                }
            ]
        },
        "DATA": {
            "content": "B0 = 0\nB1000000 = 4104\nB110 = 3\nB115200 = 4098\nB1152000 = 4105\nB1200 = 9\nB134 = 4\nB150 = 5\nB1500000 = 4106\nB1800 = 10\nB19200 = 14\nB200 = 6\nB2000000 = 4107\nB230400 = 4099\nB2400 = 11\nB2500000 = 4108\nB300 = 7\nB3000000 = 4109\nB3500000 = 4110\nB38400 = 15\nB4000000 = 4111\nB460800 = 4100\nB4800 = 12\nB50 = 1\nB500000 = 4101\nB57600 = 4097\nB576000 = 4102\nB600 = 8\nB75 = 2\nB921600 = 4103\nB9600 = 13\nBRKINT = 2\nBS0 = 0\nBS1 = 8192\nBSDLY = 8192\nCBAUD = 4111\nCBAUDEX = 4096\nCDSUSP = 25\nCEOF = 4\nCEOL = 0\nCEOT = 4\nCERASE = 127\nCFLUSH = 15\nCIBAUD = 269418496\nCINTR = 3\nCKILL = 21\nCLNEXT = 22\nCLOCAL = 2048\nCQUIT = 28\nCR0 = 0\nCR1 = 512\nCR2 = 1024\nCR3 = 1536\nCRDLY = 1536\nCREAD = 128\nCRPRNT = 18\nCRTSCTS = 2147483648\nCS5 = 0\nCS6 = 16\nCS7 = 32\nCS8 = 48\nCSIZE = 48\nCSTART = 17\nCSTOP = 19\nCSTOPB = 64\nCSUSP = 26\nCWERASE = 23\nECHO = 8\nECHOCTL = 512\nECHOE = 16\nECHOK = 32\nECHOKE = 2048\nECHONL = 64\nECHOPRT = 1024\nEXTA = 14\nEXTB = 15\nFF0 = 0\nFF1 = 32768\nFFDLY = 32768\nFIOASYNC = 21586\nFIOCLEX = 21585\nFIONBIO = 21537\nFIONCLEX = 21584\nFIONREAD = 21531\nFLUSHO = 4096\nHUPCL = 1024\nICANON = 2\nICRNL = 256\nIEXTEN = 32768\nIGNBRK = 1\nIGNCR = 128\nIGNPAR = 4\nIMAXBEL = 8192\nINLCR = 64\nINPCK = 16\nIOCSIZEMASK = 1073676288\nIOCSIZESHIFT = 16\nISIG = 1\nISTRIP = 32\nIUCLC = 512\nIXANY = 2048\nIXOFF = 4096\nIXON = 1024\nNCC = 8\nNCCS = 32\nNL0 = 0\nNL1 = 256\nNLDLY = 256\nNOFLSH = 128\nNMOUSE = 2\nNPPP = 3\nNSLIP = 1\nNSTRIP = 4\nNTTY = 0\nOCRNL = 8\nOFDEL = 128\nOFILL = 64\nOLCUC = 2\nONLCR = 4\nONLRET = 32\nONOCR = 16\nOPOST = 1\nPARENB = 256\nPARMRK = 8\nPARODD = 512\nPENDIN = 16384\nTAB0 = 0\nTAB1 = 2048\nTAB2 = 4096\nTAB3 = 6144\nTABDLY = 6144\nTCFLSH = 21515\nTCGETA = 21509\nTCGETS = 21505\nTCIFLUSH = 0\nTCIOFF = 2\nTCIOFLUSH = 2\nTCION = 3\nTCOFLUSH = 1\nTCOOFF = 0\nTCOON = 1\nTCSADRAIN = 1\nTCSAFLUSH = 2\nTCSANOW = 0\nTCSBRK = 21513\nTCSBRKP = 21541\nTCSETA = 21510\nTCSETAF = 21512\nTCSETAW = 21511\nTCSETS = 21506\nTCSETSF = 21508\nTCSETSW = 21507\nTCXONC = 21514\nTIOCCONS = 21533\nTIOCEXCL = 21516\nTIOCGETD = 21540\nTIOCGICOUNT = 21597\nTIOCGLCKTRMIOS = 21590\nTIOCGPGRP = 21519\nTIOCGSERIAL = 21534\nTIOCGSOFTCAR = 21529\nTIOCGWINSZ = 21523\nTIOCINQ = 21531\nTIOCLINUX = 21532\nTIOCMBIC = 21527\nTIOCMBIS = 21526\nTIOCMGET = 21525\nTIOCMIWAIT = 21596\nTIOCMSET = 21528\nTIOCMCAR = 64\nTIOCMCD = 64\nTIOCMCTS = 32\nTIOCMDSR = 256\nTIOCMDTR = 2\nTIOCMLE = 1\nTIOCMRI = 128\nTIOCMRNG = 128\nTIOCMRTS = 4\nTIOCMSR = 16\nTIOCMST = 8\nTIOCNOTTY = 21538\nTIOCNXCL = 21517\nTIOCOUTQ = 21521\nTIOCPKT = 21536\nTIOCPKTDATA = 0\nTIOCPKTDOSTOP = 32\nTIOCPKTFLUSHREAD = 1\nTIOCPKTFLUSHWRITE = 2\nTIOCPKTNOSTOP = 16\nTIOCPKTSTART = 8\nTIOCPKTSTOP = 4\nTIOCSCTTY = 21518\nTIOCSERCONFIG = 21587\nTIOCSERGETLSR = 21593\nTIOCSERGETMULTI = 21594\nTIOCSERGSTRUCT = 21592\nTIOCSERGWILD = 21588\nTIOCSERSETMULTI = 21595\nTIOCSERSWILD = 21589\nTIOCSERTEMT = 1\nTIOCSETD = 21539\nTIOCSLCKTRMIOS = 21591\nTIOCSPGRP = 21520\nTIOCSSERIAL = 21535\nTIOCSSOFTCAR = 21530\nTIOCSTI = 21522\nTIOCSWINSZ = 21524\nTOSTOP = 256\nVDISCARD = 13\nVEOF = 4\nVEOL = 11\nVEOL2 = 16\nVERASE = 2\nVINTR = 0\nVKILL = 3\nVLNEXT = 15\nVMIN = 6\nVQUIT = 1\nVREPRINT = 12\nVSTART = 8\nVSTOP = 9\nVSUSP = 10\nVSWTC = 7\nVSWTCH = 7\nVT0 = 0\nVT1 = 16384\nVTDLY = 16384\nVTIME = 5\nVWERASE = 14\nXCASE = 4\nXTABS = 6144\n",
            "subsections": []
        },
        "FILE": {
            "content": "/usr/lib/python3.10/lib-dynload/termios.cpython-310-x8664-linux-gnu.so\n\n",
            "subsections": []
        }
    },
    "summary": "termios",
    "flags": [],
    "examples": [],
    "see_also": []
}