gradema.grader.console._indent¶
Module Contents¶
Classes¶
A wrapper around a TextIO object to put indentation before each line. |
- class gradema.grader.console._indent.IndentTextIOWrapper(stdout: TextIO, indent: str)¶
Bases:
io.BytesIOA wrapper around a TextIO object to put indentation before each line.
This is a little messy because the subprocess package won’t let you pass just any TextIO object to the run function, so you usually have to pass subprocess.PIPE, and then feed the piped output to this for it to actually do anything.
TLDR; This would be cool to use, but it’s hard to get to work.
Additionally, putting correct type hints on this is difficult, so we need to figure that out
Notes for later: MYPY_FORCE_COLOR=1
- write(text)¶
Write bytes to file.
Return the number of bytes written.