Skip to content

Instantly share code, notes, and snippets.

@kmcallister
Created April 29, 2021 03:49
Show Gist options
  • Save kmcallister/8987a99b4d50e26998871c67a04d4abb to your computer and use it in GitHub Desktop.
Save kmcallister/8987a99b4d50e26998871c67a04d4abb to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import sys
temps = sys.argv[1:]
for ln in sys.stdin:
if ln.rstrip() == 'M600':
sys.stdout.write('M104 S' + temps.pop(0) + '\n')
else:
sys.stdout.write(ln)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment