Almenon / Almenon/AREPL-vscode

error when opening file descriptor directly

Ouverte
#335 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
backend bug
Langage dominant
TypeScript
Étoiles
301
Forks
46
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

**Describe the bug**
In arepl v1.0.24 the following error happens

```
Traceback (most recent call last):
line 2, in
OSError: [WinError 6] The handle is invalid
```

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

**Expected behavior**
The following print results are outputted:
```
hi
hi
```

**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**
The workaround is using `sys.stdout` instead of `open(1,'w')`

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.