send_message()

Sends a message from the Python script to the main application.

This function is used by the script to communicate with the host program by sending a message name and an associated value.

The main program receives these messages via a callback and decides how to process them.

Syntax

planetcnc.send_message()

Parameters

Parameter Type Description
name str The name of the message to send.
value str, int or float The value associated with the message.

Return Value

Examples

#! /usr/bin/env python 
 
import planetcnc
 
# Send a message "Status" with a value "Running" from the script to the main program.
planetcnc.send_message("Status", "Running")

See also

#OnPyMessage

ready
terminate
send_message
read_message