View Single Post
  #4   Spotlight this post!  
Unread 29-08-2011, 00:09
Peter Johnson Peter Johnson is offline
WPILib Developer
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 247
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: Python WPILib Reference?

The Python WPILib is mostly just a wrapper around the C++ one, generated by a tool called SIP (this is unlike Java, where the Java WPILib is written entirely in Java itself). The code is located in https://github.com/robotpy/robotpy/t...ackages/wpilib

The wpilib.py file is what you get when you "import wpilib", and is the only real Python file. It reimplements the robot base classes (e.g. IterativeRobot) for technical reasons (the C++ robot class runs the Python interpreter so you can't overload it directly from Python).

The rest of the library is implemented through code generated from the sip files in the sip/ directory. These are (for the most part) just stripped down copies of the C++ header files with a few tweaks where necessary to support reasonable parameter passing to and from Python.
__________________
Author of cscore - WPILib CameraServer for 2017+
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC

2010 FRC World Champions (294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)
Reply With Quote