Python script scope in Perspective?

I add Python code to a Button’s onClick event, when the user clicks the Button, does the Python script run on the Gateway or the client?

Gateway. Browsers don’t run jython.

1 Like

Thanks that helps.

If I understand correctly when a system function like is coded into a mouse event on a component, when the user triggers the event, the code runs on the Gateway but returns the client IP? Does this sound right?

It runs on on the gateway, but from a button in Perspective would get you the gateway’s IP address.

Perspective has host and address session properties that hold the remote hostname/address as the gateway sees it: Session Properties - Ignition User Manual 8.1 - Ignition Documentation

1 Like