# Which scope is my code running in?

**URL:** <https://forum.inductiveautomation.com/t/which-scope-is-my-code-running-in/15540>\
**Category:** Ignition\
**Created:** [October 2, 2017, 11:11pm UTC](https://forum.inductiveautomation.com/t/which-scope-is-my-code-running-in/15540 "2017-10-02T23:11:25Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 2, 2017, 11:21pm UTC](https://forum.inductiveautomation.com/t/which-scope-is-my-code-running-in/15540/2 "2017-10-02T23:21:17Z")

</div>

Hmm. Something like this (untested):

```python
from com.inductiveautomation.ignition.common.model import ApplicationScope

scope = ApplicationScope.getGlobalScope()

if (ApplicationScope.isClient(scope)):
	...

if (ApplicationScope.isDesigner(scope)):
	...

if (ApplicationScope.isGateway(scope)):
	...

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/which-scope-is-my-code-running-in/15540)._
