Almenon / Almenon/AREPL-vscode

different error when opening output than in python

Open
#336 3 comments 1 reaction 0 assignees View on GitHub
backend bug
Dominant language
TypeScript
Stars
301
Forks
46
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
In arepl v1.0.24 it gets the following error:
```
Traceback (most recent call last):
line 1, in
io.UnsupportedOperation: not writable
```

**To Reproduce**
```python
print('hi', file=open(2))
```

**Expected behavior**
```
Traceback (most recent call last):
line 1, in
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.