set_status()

Updates the status bar text of the PlanetCNC application.

This function takes a variable number of arguments, converts them to a string, and then sets that string as the text displayed in the application's status bar.

Syntax

planetcnc.set_status(args)

Parameters

Parameter Type Description
args tuple A tuple of one or more arguments. The arguments are converted into a single string by concatenating their string representations. This string is then used as the new status text.

Return Value

Examples

#! /usr/bin/env python 
 
import planetcnc
import time
 
# Simulate progress from 0.0 to 1.0 with a delay
steps = 100
for i in range(steps + 1):
    progress = i / steps  # Progress ranges from 0.0 to 1.0.
    planetcnc.set_progress(progress)
    planetcnc.set_status(f"Progress: {progress * 100:.1f}%")
    print(f"Progress: {progress * 100:.1f}%")
    time.sleep(0.1)  # Simulate work being done
 
planetcnc.set_progress(0)
planetcnc.set_status("")

See also

is_visible
show
hide
set_progress
set_status