{
    "mode": "pydoc",
    "parameter": "_xxsubinterpreters",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/_xxsubinterpreters/json",
    "generated": "2026-06-02T15:07:43Z",
    "sections": {
        "NAME": {
            "content": "xxsubinterpreters\n",
            "subsections": []
        },
        "MODULE REFERENCE": {
            "content": "https://docs.python.org/3.10/library/xxsubinterpreters.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 primitive operations to manage Python interpreters.\nThe 'interpreters' module provides a more convenient interface.\n",
            "subsections": []
        },
        "CLASSES": {
            "content": "builtins.RuntimeError(builtins.Exception)\nChannelError\nChannelClosedError\nChannelEmptyError\nChannelNotEmptyError\nChannelNotFoundError\nRunFailedError\nbuiltins.object\nChannelID\n",
            "subsections": [
                {
                    "name": "class ChannelClosedError",
                    "content": "|  Method resolution order:\n|      ChannelClosedError\n|      ChannelError\n|      builtins.RuntimeError\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors inherited from ChannelError:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.RuntimeError:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.RuntimeError:\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"
                },
                {
                    "name": "class ChannelEmptyError",
                    "content": "|  Method resolution order:\n|      ChannelEmptyError\n|      ChannelError\n|      builtins.RuntimeError\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors inherited from ChannelError:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.RuntimeError:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.RuntimeError:\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"
                },
                {
                    "name": "class ChannelError",
                    "content": "|  Method resolution order:\n|      ChannelError\n|      builtins.RuntimeError\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.RuntimeError:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.RuntimeError:\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"
                },
                {
                    "name": "class ChannelID",
                    "content": "|  A channel ID identifies a channel and may be used as an int.\n|\n|  Methods defined here:\n|\n|  eq(self, value, /)\n|      Return self==value.\n|\n|  ge(self, value, /)\n|      Return self>=value.\n|\n|  gt(self, value, /)\n|      Return self>value.\n|\n|  hash(self, /)\n|      Return hash(self).\n|\n|  index(self, /)\n|      Return self converted to an integer, if self is suitable for use as an index into a list.\n|\n|  int(self, /)\n|      int(self)\n|\n|  le(self, value, /)\n|      Return self<=value.\n|\n|  lt(self, value, /)\n|      Return self<value.\n|\n|  ne(self, value, /)\n|      Return self!=value.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  end\n|      'send', 'recv', or 'both'\n|\n|  recv\n|      the 'recv' end of the channel\n|\n|  send\n|      the 'send' end of the channel\n"
                },
                {
                    "name": "class ChannelNotEmptyError",
                    "content": "|  Method resolution order:\n|      ChannelNotEmptyError\n|      ChannelError\n|      builtins.RuntimeError\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors inherited from ChannelError:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.RuntimeError:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.RuntimeError:\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"
                },
                {
                    "name": "class ChannelNotFoundError",
                    "content": "|  Method resolution order:\n|      ChannelNotFoundError\n|      ChannelError\n|      builtins.RuntimeError\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors inherited from ChannelError:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.RuntimeError:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.RuntimeError:\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"
                },
                {
                    "name": "class RunFailedError",
                    "content": "|  Method resolution order:\n|      RunFailedError\n|      builtins.RuntimeError\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.RuntimeError:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.RuntimeError:\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": "channel_close",
                    "content": "channelclose(cid, *, send=None, recv=None, force=False)\n\nClose the channel for all interpreters.\n\nIf the channel is empty then the keyword args are ignored and both\nends are immediately closed.  Otherwise, if 'force' is True then\nall queued items are released and both ends are immediately\nclosed.\n\nIf the channel is not empty *and* 'force' is False then following\nhappens:\n\n* recv is True (regardless of send):\n- raise ChannelNotEmptyError\n* recv is None and send is None:\n- raise ChannelNotEmptyError\n* send is True and recv is not True:\n- fully close the 'send' end\n- close the 'recv' end to interpreters not already receiving\n- fully close it once empty\n\nClosing an already closed channel results in a ChannelClosedError.\n\nOnce the channel's ID has no more ref counts in any interpreter\nthe channel will be destroyed.\n"
                },
                {
                    "name": "channel_create",
                    "content": "channelcreate() -> cid\n\nCreate a new cross-interpreter channel and return a unique generated ID.\n"
                },
                {
                    "name": "channel_destroy",
                    "content": "channeldestroy(cid)\n\nClose and finalize the channel.  Afterward attempts to use the channel\nwill behave as though it never existed.\n"
                },
                {
                    "name": "channel_list_all",
                    "content": "channellistall() -> [cid]\n\nReturn the list of all IDs for active channels.\n"
                },
                {
                    "name": "channel_list_interpreters",
                    "content": "channellistinterpreters(cid, *, send) -> [id]\n\nReturn the list of all interpreter IDs associated with an end of the channel.\n\nThe 'send' argument should be a boolean indicating whether to use the send or\nreceive end.\n"
                },
                {
                    "name": "channel_recv",
                    "content": "channelrecv(cid, [default]) -> obj\n\nReturn a new object from the data at the front of the channel's queue.\n\nIf there is nothing to receive then raise ChannelEmptyError, unless\na default value is provided.  In that case return it.\n"
                },
                {
                    "name": "channel_release",
                    "content": "channelrelease(cid, *, send=None, recv=None, force=True)\n\nClose the channel for the current interpreter.  'send' and 'recv'\n(bool) may be used to indicate the ends to close.  By default both\nends are closed.  Closing an already closed end is a noop.\n"
                },
                {
                    "name": "channel_send",
                    "content": "channelsend(cid, obj)\n\nAdd the object's data to the channel's queue.\n"
                },
                {
                    "name": "create",
                    "content": "create() -> ID\n\nCreate a new interpreter and return a unique generated ID.\n"
                },
                {
                    "name": "destroy",
                    "content": "destroy(id)\n\nDestroy the identified interpreter.\n\nAttempting to destroy the current interpreter results in a RuntimeError.\nSo does an unrecognized ID.\n"
                },
                {
                    "name": "get_current",
                    "content": "getcurrent() -> ID\n\nReturn the ID of current interpreter.\n"
                },
                {
                    "name": "get_main",
                    "content": "getmain() -> ID\n\nReturn the ID of main interpreter.\n"
                },
                {
                    "name": "is_running",
                    "content": "isrunning(id) -> bool\n\nReturn whether or not the identified interpreter is running.\n"
                },
                {
                    "name": "is_shareable",
                    "content": "isshareable(obj) -> bool\n\nReturn True if the object's data may be shared between interpreters and\nFalse otherwise.\n"
                },
                {
                    "name": "list_all",
                    "content": "listall() -> [ID]\n\nReturn a list containing the ID of every existing interpreter.\n"
                },
                {
                    "name": "run_string",
                    "content": "runstring(id, script, shared)\n\nExecute the provided string in the identified interpreter.\n\nSee PyRunSimpleStrings.\n"
                }
            ]
        },
        "FILE": {
            "content": "/usr/lib/python3.10/lib-dynload/xxsubinterpreters.cpython-310-x8664-linux-gnu.so\n\n",
            "subsections": []
        }
    },
    "summary": "xxsubinterpreters",
    "flags": [],
    "examples": [],
    "see_also": []
}