import re
p = re.compile(r'\s*\([^()]*\)[ \t]*$', re.MULTILINE)
s = "%\nO1000\nT1 M6\nG0 G90 G40 G21 G17 G94 G80\nG54 X-75 Y-25 S500 M3 (Start Point)\nG43 Z100 H1\nZ5\nG1 Z-20 F100\nX-50 M8 (Position 1)\nY0 (Position 2)\nX0 Y50 (Position 3)\nX50 Y0 (Position 4)\nX0 Y-50 (Position 5)\nX-50 Y0 (Position 6)\nY25 (Position 7)\nX-75 (Position 8)\nG0 Z100\nM30\n%"
result = p.sub("", s)
print(result)
aW1wb3J0IHJlCnAgPSByZS5jb21waWxlKHInXHMqXChbXigpXSpcKVsgXHRdKiQnLCByZS5NVUxUSUxJTkUpCnMgPSAiJVxuTzEwMDBcblQxIE02XG5HMCBHOTAgRzQwIEcyMSBHMTcgRzk0IEc4MFxuRzU0IFgtNzUgWS0yNSBTNTAwIE0zICAoU3RhcnQgUG9pbnQpXG5HNDMgWjEwMCBIMVxuWjVcbkcxIFotMjAgRjEwMFxuWC01MCBNOCAgICAgICAgICAgICAgIChQb3NpdGlvbiAxKVxuWTAgICAgICAgICAgICAgICAgICAgIChQb3NpdGlvbiAyKVxuWDAgWTUwICAgICAgICAgICAgICAgIChQb3NpdGlvbiAzKVxuWDUwIFkwICAgICAgICAgICAgICAgIChQb3NpdGlvbiA0KVxuWDAgWS01MCAgICAgICAgICAgICAgIChQb3NpdGlvbiA1KVxuWC01MCBZMCAgICAgICAgICAgICAgIChQb3NpdGlvbiA2KVxuWTI1ICAgICAgICAgICAgICAgICAgIChQb3NpdGlvbiA3KVxuWC03NSAgICAgICAgICAgICAgICAgIChQb3NpdGlvbiA4KVxuRzAgWjEwMFxuTTMwXG4lIgpyZXN1bHQgPSBwLnN1YigiIiwgcykKcHJpbnQocmVzdWx0KQ==