jmespath / jmespath/jmespath.terminal
NameError: name fcntl is not defined on Windows 10 with Python 3.8
- Dominant language
- Python
- Stars
- 478
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Description
TL;TR: Does jpterm support Windows?
I tried it on Windows 10 with [built-in installation of Python](https://devblogs.microsoft.com/python/python-in-the-windows-10-may-2019-update/) inside PowerShell console and it failed:
```
❯ python -c 'import jpterm; print(jpterm.__version__)'
0.2.1
```
```
❯ python
Python 3.8.6 (tags/v3.8.6:db45529, Sep 23 2020, 15:52:53) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import jpterm
>>> jpterm.main()
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\mateuszl\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\jpterm.py", line 226, in main
screen = urwid.raw_display.Screen()
File "C:\Users\mateuszl\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\urwid\raw_display.py", line 85, in __init__
fcntl.fcntl(self._resize_pipe_rd, fcntl.F_SETFL, os.O_NONBLOCK)
NameError: name 'fcntl' is not defined
```
```
❯ az vm list --output json | python -c 'import jpterm; jpterm.main()'
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\mateuszl\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\jpterm.py", line 221, in main
input_json = _load_input_json(getattr(args, 'input-json', None))
File "C:\Users\mateuszl\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\jpterm.py", line 189, in _load_input_json
sys.stdin = open(os.ctermid(), 'r')
AttributeError: module 'os' has no attribute 'ctermid'
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.