Skip to content

Commit

Permalink
Add a __main__.py file for invocation as a module
Browse files Browse the repository at this point in the history
This file allows an easy invocation of websockify as a module, which is handy when running into shebang issues (pypa/virtualenv#596).
With this patch, `python -m websockify ...` has just the same behavior as `./run ...`.
  • Loading branch information
Hyask committed Jun 13, 2019
1 parent 01a184f commit f21a7d3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions websockify/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import websockify

if __name__ == '__main__':
websockify.websocketproxy.websockify_init()

0 comments on commit f21a7d3

Please sign in to comment.