# When are modules and datasets loaded?

**URL:** <https://forum.inductiveautomation.com/t/when-are-modules-and-datasets-loaded/71710>\
**Category:** Ignition\
**Created:** [March 28, 2023, 2:54pm UTC](https://forum.inductiveautomation.com/t/when-are-modules-and-datasets-loaded/71710 "2023-03-28T14:54:54Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [March 28, 2023, 3:33pm UTC](https://forum.inductiveautomation.com/t/when-are-modules-and-datasets-loaded/71710/2 "2023-03-28T15:33:01Z")

</div>

> [@Cecil\_Rhoades](#):
>
> since Python is interpreted. Does it load once, or every time the script is executed?

> [@Load Jython Classes on Startup](https://forum.inductiveautomation.com/t/load-jython-classes-on-startup/63585/3):
>
> What classes/functions/objects aren’t ? (Project library scripts are pre-loaded into script environments automatically. No need to import. Actually, importing a project script can cause subtle bugs when project hierarchies are saved/reloaded.) Just refer to project library classes/functions/objects by their fully qualified name wherever you need them. Without any import.

> [@Cecil\_Rhoades](#):
>
> How do I scope this so that it behaves like global variables until I reload it.

Start here:

> [@Global Scripting Variables (Library Script Top-Level Vars)](https://forum.inductiveautomation.com/t/global-scripting-variables-library-script-top-level-vars/60516/2):
>
> Gateway events sharing the same scope is an artifact of some backwards-compatibility decisions long ago. Generally, you would use a dictionary or similar defined in the top level of your project script. Those you can access by full name from elsewhere. (Elsewhere in the same scope, that is. “project library” isn’t a scope. Project libraries run in the scope they are called from.)

---

_[View the full topic](https://forum.inductiveautomation.com/t/when-are-modules-and-datasets-loaded/71710)._
