AREPL-vscode
AREPL-vscode copied to clipboard
different error when opening output than in python
Describe the bug In arepl v1.0.24 it gets the following error:
Traceback (most recent call last):
line 1, in <module>
io.UnsupportedOperation: not writable
To Reproduce
print('hi', file=open(2))
Expected behavior
Traceback (most recent call last):
line 1, in <module>
ValueError: Cannot open console output buffer for reading
Screenshots If applicable, add screenshots to help explain your problem.
Other Information (please complete the following information):
- OS: Windows 10
- Python Version: 3.8.1
Additional context Same error with file 1. Using sys.stdout will result in a error matching vanilla python as expected.
If you run into this problem please comment to let me know.
I have run into this in the same case; I am trying to open the stdout as a file for reading in binary mode, but I cannot using this method because of this error.
Do you mean you're trying to open stdout as a file for writing? Stdout is for output only, it should not be read from.