MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / fdopen

Function fdopen

tools/python-3.11.9-amd64/Lib/os.py:1025–1031  ·  view source on GitHub ↗
(fd, mode="r", buffering=-1, encoding=None, *args, **kwargs)

Source from the content-addressed store, hash-verified

1023
1024# Supply os.fdopen()
1025def fdopen(fd, mode="r", buffering=-1, encoding=None, *args, **kwargs):
1026 if not isinstance(fd, int):
1027 raise TypeError("invalid fd type (%s, expected integer)" % type(fd))
1028 import io
1029 if "b" not in mode:
1030 encoding = io.text_encoding(encoding)
1031 return io.open(fd, mode, buffering, encoding, *args, **kwargs)
1032
1033
1034# For testing purposes, make sure the function is available when the C

Callers

nothing calls this directly

Calls 2

typeClass · 0.50
openMethod · 0.45

Tested by

no test coverage detected