Python interface to Train Simulator 2016
Python interface to Train Simulator 2016. The aim of this project is to ease communication with raildriver.dll provided with Train Simulator. You can find the original documentation for raildriver.dll in Matt Peddlesden’s article on Engine Driver.
py-raildriver has no external dependencies.
pip install py-raildriver
See raildriver.RailDriver docstrings.
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') 50.004728991072624922
Bugs & Contributing
Please use Github to report bugs and feature requests: http://github.com/centralniak/py-raildriver
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 setup.py test
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.