# Sub Modules

With Robpod Studio you can use DRL scripts as common python modules and use the **import** statment to make code in one module available in another.

This way, you don’t have to put all your code into a single script—you can organize your robot application using libraries.

In order to setup a project with multiple modules:

1. Put your module files in the project folder.&#x20;
2. Use the **import** statement to load the code of a module inside another.&#x20;

   <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FO6JfD4vDLZOfoFX9HH7g%2Fsub-modules.png?alt=media&#x26;token=0d14e84c-c1e5-40f9-a81d-efe7de3e40ed" alt=""><figcaption></figcaption></figure>
3. ![](https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2F4eP35WIUFMN2yvUGcaH7%2Fsynchronize.png?alt=media\&token=762a6f7a-935e-4c02-b7c8-d9d9f194bf21) [Synchronize](https://docs.robpod.cloud/synchronization/upload-on-robot#doosan-robotics) all the module files.
4. Inside task editor add a **Robpod Script** command and in its properties specify the main entry point of the application.&#x20;

   <figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FNkFVD4oNzCl9cIROpwdk%2FImmagine%202025-08-21%20094756.png?alt=media&#x26;token=6f33b894-1d1e-4d3b-8854-15b55ccebbc4" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
**Modules Cache**

The robot uses a caching mechanism that imports and loads modules only once, storing them for later use. Because of this, if you modify a submodule after the application has already run, the changes won’t take effect immediately. To apply the updates, a robot restart is required.

To avoid this inconvenience, you can add a **Robpod Script** command for each of your modules at the beginning of the program and enable the ***Load as Module*** option. This forces the robot to reload the module, allowing you to test your changes without restarting the robot.&#x20;

<img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Fm8qwwS1KSomQ2rjIv4qw%2FImmagine%202025-08-21%20094839.png?alt=media&#x26;token=303efc4d-fc68-431d-81bc-7299ff9b8d1d" alt="" data-size="original">

{% endhint %}
