jamesremuscat / pcars

Python client for Project CARS UDP data stream.
15 stars 16 forks source link

pcars

Build Status Coverage Status

INTRODUCTION

pcars is a Python client for the Project CARS UDP data stream.

Quickstart

from pcars.stream import PCarsStreamReceiver

class MyPCarsListener(object):
    def handlePacket(self, data):
        # You probably want to do something more exciting here
        # You probably also want to switch on data.packetType
        # See listings in packet.py for packet types and available fields for each
        print data

listener = MyPCarsListener()
stream = PCarsStreamReceiver()
stream.addListener(listener)
stream.start()