Is there a JMESPath Terminal for windows 10?

949 views Asked by At

I have installed python 3.5.2 on my windows 10 machine. I also installed JMESPath Terminal by using following command on windows command line:

pip install jmespath-terminal

Everything went smooth and it was successfully installed.

But when I type following: jpterm

It says that 'jpterm' is not recognized.

Am I missing something or that above pip command only works on non-windows machines only?

1

There are 1 answers

0
Cristian Diaconescu On

TL;DR: this is currently (dec 2017) simply not supported on Windows.

The install is broken. You can get jpterm.py from the project's GitHub page here and pop it into your \pythonXX\Scripts\ folder.

Then you'll get this:

Traceback (most recent call last):
  File "C:\Python36\Scripts\jpterm.py", line 239, in <module>
    sys.exit(main())
  File "C:\Python36\Scripts\jpterm.py", line 228, in main
    screen = urwid.raw_display.Screen()
  File "C:\Python36\lib\site-packages\Traceback (most recent call last):
File "C:\Python36\Scripts\jpterm.py", line 239, in <module>
sys.exit(main())
File "C:\Python36\Scripts\jpterm.py", line 228, in main
screen = urwid.raw_display.Screen()
File "C:\Python36\lib\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\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**

...and looking it up in the urwid project issues (the thing that draws "windows" in the terminal), you'll get this:

https://github.com/urwid/urwid/issues/152

which basically says 'urwid doesn't support Windows'.