httpwatcher icon indicating copy to clipboard operation
httpwatcher copied to clipboard

please support "python -m httpwatcher"

Open hananbeer opened this issue 4 years ago • 3 comments

I use "python -m http.server" a lot. your solution is exactly what I needed. I found a no-brainer solution to support "-m" flag, just add the following file run.py:

# -*- coding:utf-8 -*-
import httpwatcher
httpwatcher.watch('.')

and you can run "python -m httpwatcher.run"

hananbeer avatar Mar 21 '21 10:03 hananbeer

The easiest solution to this would be to add a __main__.py file with the exact code above. How do you feel about this? @thanethomson

jobveldhuis avatar May 19 '21 11:05 jobveldhuis

Sure, sounds good :+1:

thanethomson avatar May 23 '21 11:05 thanethomson

The latest version of the dev branch now contains a simple Python script that allows you to call:

python -m httpwatcher

jobveldhuis avatar May 25 '21 17:05 jobveldhuis