No termios on windows
- Dominant language
- Python
- Stars
- 3.6k
- Forks
- 119
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
bullet doesn't work on Windows as there is no termios module. I get the following stack trace when trying to run [this example](https://github.com/Mckinsey666/bullet/blob/master/examples/more.py) code under CPython 3.7.2 on Windows 10 v1803 Enterprise.
```
Traceback (most recent call last):
File "h:\Python\Misc\bullet_test.py", line 1, in
from bullet import Bullet
File "C:\Program Files\Python37\lib\site-packages\bullet\__init__.py", line 1, in
from .client import Bullet
File "C:\Program Files\Python37\lib\site-packages\bullet\client.py", line 4, in
from . import utils
File "C:\Program Files\Python37\lib\site-packages\bullet\utils.py", line 3, in
import tty, termios
File "C:\Program Files\Python37\lib\tty.py", line 5, in
from termios import *
ModuleNotFoundError: No module named 'termios'
```
Confirmed from the ipython shell directly using the import command.
```
In [1]: import bullet
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
in
----> 1 import bullet
c:\program files\python37\lib\site-packages\bullet\__init__.py in
----> 1 from .client import Bullet
c:\program files\python37\lib\site-packages\bullet\client.py in
2 from .charDef import *
3 from . import colors
----> 4 from . import utils
5 from . import cursor
6
c:\program files\python37\lib\site-packages\bullet\utils.py in
1 import os
2 import sys
----> 3 import tty, termios
4 import string
5 from .charDef import *
c:\program files\python37\lib\tty.py in
3 # Author: Steen Lumholt.
4
----> 5 from termios import *
6
7 __all__ = ["setraw", "setcbreak"]
ModuleNotFoundError: No module named 'termios'
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading bullet/utils.py, where the unconditional tty and termios imports fail, then run the example in examples/more.py under CPython on Windows. Check the existing comment thread for any proposed compatibility approach. Done means importing bullet and running the example on Windows without the termios error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100