Comments (8)
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.
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.
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.
Could you do me a favor and just run import curses
in a python shell?
from autohooks.
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.
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.
Hmm maybe blessings doesn't work at all on windows erikrose/blessings#21
from autohooks.
(FWIW, blessed, a fork of blessings, does work on windows)
from autohooks.
Related Issues (16)
- autohooks.utils.GitError: Git command '['git', '-C', '...', 'rev-parse', '--git-dir']' returned non-zero exit status 128 HOT 15
- commit fails on Windows with Python encoding error HOT 7
- additional hooks (ie commit-msg) HOT 4
- (Feature Request) Mandatory hooks / less graceful ImportError failure HOT 7
- `packaging` requirement HOT 5
- Supported mypy plugin HOT 2
- Pipenv mode is broken by the --split-string (-S) argument of env in the shebang HOT 9
- Output overwritten by carriage return HOT 9
- Enable system wide autohooks called from git commit in a virtual environment (eg. to support PyCharm) HOT 7
- Terminal class fails to determine witdth in NeoVim HOT 4
- Support ruff HOT 6
- Request to add ruff HOT 5
- Poetry Hooks HOT 1
- When creating a custom hook in .authooks directory I get: No module named 'autohooks.plugin.flake8' HOT 2
- Windows Problem HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autohooks.