summaryrefslogtreecommitdiff
path: root/websockify.py
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2012-09-17 14:06:51 -0500
committerJoel Martin <github@martintribe.org>2012-09-17 14:06:51 -0500
commitc0d23e27e4b94ee549d3dd5918fdc89bd91171ca (patch)
treecad73f9f9ef9411200d39e38099301546a350af5 /websockify.py
parent2d2798954ea76e5d99a861e4283683a7f1bd1401 (diff)
downloadwebsockify-c0d23e27e4b94ee549d3dd5918fdc89bd91171ca.tar.gz
Refactor into python modules: websocket, websocketproxy
Make websockify subdirectory and move websocket.py -> websockify/websocket.py and websockify -> websockify/websocketproxy.py. Create a ./run script that launches websockify as before (unfortunately can't have a websockify script at the same level since this is now a directory). Make websockify.py a symlink to ./run. Once the package is installed, the main launch script will be /usr/bin/websockify. This makes it easier to package up websockify as a python module. setup.py should now properly install websockify as a module. Note that to include the base websocket module/class you will now do: import websockify.websocket #OR from websockify.websocket import WebSocketServer To import the full websocket proxy functionality: import websockify.websocketproxy #OR from websockify.websocket import WebSocketProxy This will also help with startup speed slightly because the code in websocketproxy will now be byte compiled since it is no longer in the main invocation script.
Diffstat (limited to 'websockify.py')
l---------websockify.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/websockify.py b/websockify.py
index 05b5af4..e5224d5 120000
--- a/websockify.py
+++ b/websockify.py
@@ -1 +1 @@
-websockify \ No newline at end of file
+run \ No newline at end of file