Skip to content

Instantly share code, notes, and snippets.

@forslund
forslund / wstest.py
Created August 15, 2017 10:02
Connecting to the mycroft message bus.
#! /usr/bin/env python
import sys
from websocket import create_connection
uri = 'ws://' + sys.argv[1] + ':8181/core'
ws = create_connection(uri)
print "Sending " + sys.argv[2] + " to " + uri + "..."
if len(sys.argv) >= 4:
data = sys.argv[3]
else: