Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

Python interface to Train Simulator 2016

Project description

Python interface to Train Simulator 2016. The aim of this project is to ease communication with raildriver.dll provided with Train Simulator.

py-raildriver’s only external dependency is six which should make this project compatible with both Python 2 and 3.


pip install py-raildriver


See raildriver.RailDriver docstrings.

Usage example

Start your Railworks.exe, get running, pause and try this in your Python console.

>>> import raildriver
>>> rd = raildriver.RailDriver()
>>> rd.set_rail_driver_connected(True)  # start data exchange
>>> assert 'SpeedometerMPH' in dict(rd.get_controller_list()).values(), 'SpeedometerMPH is not available on this loco'
>>> rd.get_current_controller_value('SpeedometerMPH')

Bugs & Contributing

Please use Github to report bugs and feature requests:

Code contributions are of course more than welcome. Please remember about unit tests or your code might not be accepted. You can run the test suite with::

python test
author:Piotr Kilczuk

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for py-raildriver, version 1.1.7
Filename, size File type Python version Upload date Hashes
Filename, size (9.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page