Add a __main__.py file for invocation as a module

This file allows an easy invocation of websockify as a module, which is handy when running into shebang issues (https://github.com/pypa/virtualenv/issues/596).
With this patch, `python -m websockify ...` has just the same behavior as `./run ...`.
This commit is contained in:
Skia 2019-05-28 10:27:51 +02:00
parent 01a184f4a9
commit f21a7d33a2
1 changed files with 4 additions and 0 deletions

4
websockify/__main__.py Normal file
View File

@ -0,0 +1,4 @@
import websockify
if __name__ == '__main__':
websockify.websocketproxy.websockify_init()