Open matsonkepson opened 6 years ago
after installing missing modules manually
getting the answer "Redirection is not supported"
user@host MINGW64 /c/temp/wpm (master)
$ pip install curses-2.2+utf8-cp36-cp36m-win_amd64.whl
Processing c:\temp\wpm\curses-2.2+utf8-cp36-cp36m-win_amd64.whl
Installing collected packages: curses
Successfully installed curses-2.2+utf8
user@host MINGW64 /c/temp/wpm (master)
$ python -m wpm
Redirection is not supported.
$ wpm
Redirection is not supported.
I don't own a Windows system, so I can't look into this. But you can probably google it and find out if curses is fully supported on the windows command shell like you're using. By "fully" I mean that all the attributes and stuff are translated (in theory, I guess it should work just fine, but it may not be so in practice).
heh, I will try :)
What I can add from my side that I was trying to run it in PowerShell/cmd but it is exiting with the same exit error
PS C:\temp\wpm> python -m wpm Traceback (most recent call last): File "C:\Python36\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Python36\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\temp\wpm\wpm__main.py", line 17, in
wpm.commandline.main() File "C:\temp\wpm\wpm\commandline.py", line 237, in main with wpm.game.GameManager(quotes, stats, opts.cpm) as gm: File "C:\temp\wpm\wpm\game.py", line 45, in init self.screen = Screen() File "C:\temp\wpm\wpm\screen.py", line 70, in init__ self.set_colors() File "C:\temp\wpm\wpm\screen.py", line 153, in set_colors hicolor = os.getenv("TERM").endswith("256color") AttributeError: 'NoneType' object has no attribute 'endswith'
Also was able to get the first screen by the https://conemu.github.io/ soft but after typing the first letter i got this
C:\temp\wpm (master -> origin) λ python -m wpm Traceback (most recent call last): File "C:\Python36\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Python36\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\temp\wpm\wpm__main__.py", line 17, in
wpm.commandline.main() File "C:\temp\wpm\wpm\commandline.py", line 239, in main gm.run(to_front=text_ids) File "C:\temp\wpm\wpm\game.py", line 99, in run head = self.get_stats(self.elapsed) File "C:\temp\wpm\wpm\game.py", line 162, in get_stats "%5.1f wpm" % self.wpm(elapsed), File "C:\temp\wpm\wpm\game.py", line 128, in wpm return min((60.0 * self.position / 5.0) / elapsed, 999) ZeroDivisionError: float division by zero
Yeah, the hicolor part is very unix specific, so just skip those TERM parts. As to div by zero, seems elapsed doesn't have a value. Just return any float value there while testing (or check if elapsed is zero).
Hi @cslarsen, thank you for publishing this application! Managed to get it working on native windows, could you please review #47?
Trerminal windows 10 > MINGW64 $ python --version Python 3.6.5
$ python -m wpm Traceback (most recent call last): File "C:\Python36\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Python36\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\temp\wpm\wpm__main.py", line 14, in
import wpm.commandline
File "C:\temp\wpm\wpm\commandline.py", line 22, in
import wpm.config
File "C:\temp\wpm\wpm\config.py", line 14, in
import curses
File "C:\Python36\lib\curses\ init__.py", line 13, in
from _curses import *
ModuleNotFoundError: No module named '_curses'