Communicating with OptiTrack and Motive

Does anyone know how to send messages or port codes from the Psychopy script to the OptiTrack tracking data file?