Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ There are three ways to get `httpstat`:
- Through homebrew (macOS only): `brew install httpstat`

> For Windows users, @davecheney's [Go version](https://github.com/davecheney/httpstat) is suggested. → [download link](https://github.com/davecheney/httpstat/releases)
>
> Or install through `pip install httpstat[windows]` to have better support.

## Usage

Expand Down
10 changes: 10 additions & 0 deletions httpstat.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@
if PY3:
xrange = range

WIN = os.name == 'nt'

if WIN:
try:
import colorama
except ImportError:
print('Please install colorama for better color support in Windows')
else:
colorama.init()


# Env class is copied from https://github.com/reorx/getenv/blob/master/getenv.py
class Env(object):
Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,8 @@ def get_long_description():
'httpstat = httpstat:main'
]
},
extras_require={
'windows': ['colorama'],
},
license='License :: OSI Approved :: MIT License',
)