Call external py script from button

Where does the .py file live - on the client running vision, or on the gateway? If the client is running perspective, all scripts run on the gateway and it will need to be on the gateway.

You will want to use ProcessBuilder over subprocess. Check out this example though there are others here if you search

Note too - if this is vision - it does likely make more sense to have it on the gateway instead of putting a .py file on every single client. You can then write the result to a gateway tag and bind the button text to that in some fashion, or use message handlers.

2 Likes