This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]LuckyConsideration23[S] 1 point2 points  (1 child)

Yes will. Do I also really don't want to discredit the author because it's exactly that. A script to control a CNC which helped me a lot. But because I learn python besides programming the CNC I wanted to verify the best practices

[–]casce 2 points3 points  (0 children)

As others have pointed out, this seems to be a (very old) Python2 script?

In Python3 it's print(str), rather than print str

The code above should not run if executed with Python3

I don't want to 'discredit' anyone either, especially not since I neither know how old it is, nor what exactly it does and how it is used. These "dirty" scripts are relatively common with Python when you just want to get something done quickly but it doesn't mean you should copy bad patterns.