Code Monkey home page Code Monkey logo

Comments (8)

bjoernricks avatar bjoernricks commented on May 20, 2024

Internally autohooks uses blessings to provide colorization of the console output. After looking at it I don't think it supports Windows :-/

Personally I am not able to write any code for Windows because my knowledge about it is very small. And I also don't have access to any Windows system.

But this doesn't mean autohooks shouldn't get support for Windows. I am only relying on PRs from external contributors.

from autohooks.

bjoernricks avatar bjoernricks commented on May 20, 2024

As far as I know curses should be at least importable at windows. Could you paste the whole taceback? Maybe it is already possible to support windows by using https://github.com/tartley/colorama

from autohooks.

scruffaluff avatar scruffaluff commented on May 20, 2024

FYI, I am using powershell on Windows with poetry and pyenv. I haven’t tried colorama, but here is the trace back:

 Windows: poetry run autohooks activate
Traceback (most recent call last):
  File "C:\Users\user\.pyenv\pyenv-win\versions\3.8.0-amd64\lib\runpy.py", line 192, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\user\.pyenv\pyenv-win\versions\3.8.0-amd64\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\user\tmp\ahook\.venv\Scripts\autohooks.exe\__main__.py", line 5, in <module>
  File "c:\users\user\tmp\ahook\.venv\lib\site-packages\autohooks\cli\__init__.py", line 20, in <module>
    from autohooks.terminal import Terminal
  File "c:\users\user\tmp\ahook\.venv\lib\site-packages\autohooks\terminal.py", line 17, in <module>
    import curses
  File "C:\Users\user\.pyenv\pyenv-win\versions\3.8.0-amd64\lib\curses\__init__.py", line 13, in <module>
    from _curses import *
ModuleNotFoundError: No module named '_curses'

from autohooks.

bjoernricks avatar bjoernricks commented on May 20, 2024

Could you do me a favor and just run import curses in a python shell?

from autohooks.

scruffaluff avatar scruffaluff commented on May 20, 2024

Sure. Here is the trace back:

Windows: python -i
Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import curses
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\user\.pyenv\pyenv-win\versions\3.8.0-amd64\lib\curses\__init__.py", line 13, in <module>
    from _curses import *
ModuleNotFoundError: No module named '_curses'

from autohooks.

bjoernricks avatar bjoernricks commented on May 20, 2024

ok. I've done some research. Python in windows doesn't support curses. It seems you need to install an additional library to get it working https://www.lfd.uci.edu/~gohlke/pythonlibs/#curses

From https://docs.python.org/3/howto/curses.html#curses-howto

The Windows version of Python doesn’t include the curses module. A ported version called UniCurses is available. You could also try the Console module written by Fredrik Lundh, which doesn’t use the same API as curses but provides cursor-addressable text output and full support for mouse and keyboard input.

from autohooks.

bjoernricks avatar bjoernricks commented on May 20, 2024

Hmm maybe blessings doesn't work at all on windows erikrose/blessings#21

from autohooks.

jquast avatar jquast commented on May 20, 2024

(FWIW, blessed, a fork of blessings, does work on windows)

from autohooks.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.