Has anyone done a send text message on error function ? I did it in M3 and M4 and UCCNC but so far Python is a mystery to me. Not a programmer.
(;-) TP
Has anyone done a send text message on error function ? I did it in M3 and M4 and UCCNC but so far Python is a mystery to me. Not a programmer.
(;-) TP
Hi Guys I am working on code to send a text message from PathPilot. I am tryin gthis code but I keep getting an error I do not know how to handle. It seems that Python is extremely indent sensitive ??
Anyone know how to fix it.
import smtplib
smtpObj = smtplib.SMTP('smtp.EXAMPLE.com', 587)
smtpObj.ehlo()
smtpObj.starttls()
smtpObj.login('[email protected]', ' PASSWORD')
smtpObj.sendmail('[email protected]', '[email protected]', 'Subject: Machine #29 , Broken ToolBit'){}
smtpObj.quit()
I get this error when I run the script in PP
IndentationError: unexpected indent
OK PP can now call home (;-) Just need to figue out how to control it and use it for error messages and to send a message to a supervisor from teh controller. Type in a message and push teh CALL button.
(;-) TP
Yeah, in Python, indentation matters.
versusCode:if something: do_thing_one() do_thing_two()
mean different things!Code:if something: do_thing_one() do_thing_two()
(Also, tabs count as one space, so if you aren't consistent in whether you use space or tab, you'll be quite confused.)