A python library for interfacing with OutGauge in a (hopefully) simple way.
Designed for WinPython 3.11, but should run on most past Python versions.
- Clone the project
git clone https://github.com/jeepracer98/pyog.git
- Change directory to the top level folder of
pyog
cd pyog
- Create and activate a virtual enviroment (recommended)
python3 -m venv win-venvwin-venv\Scripts\activate
- Install
pyogwith pip
python3 -m pip install -e .- This will only work if you are in the
pyogfolder wheresetup.pyis.
- If you plan to be commiting to the
pyogproject, install pre-commit with:
python3 -m pip install -r requirements-dev.txtpre-commit install
Then you can integrate pyog into programs by opening the socket and reading data from
it. Here's a simple example which will keep trying to read data until you press Ctrl+C.
import pyog
IP = "127.0.0.1"
PORT = 4444
with pyog.create_socket(IP, PORT) as sock:
while True:
print(pyog.read_outgauge_data(sock))
# and/or pyog.read_motionsim_data(sock)If you're using both OutGauge and MotionSim, make sure they aren't running on the same port. This will cause the two streams of data to mix together and get garbled.