Updates the progress bar in the PlanetCNC application. This function accepts a single floating-point value, where 0.0 represents 0% progress and 1.0 represents 100% progress.
planetcnc.set_progress(dbl)
#! /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("")