> For the complete documentation index, see [llms.txt](https://particle-analytics-1.gitbook.io/iotasuite-user-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://particle-analytics-1.gitbook.io/iotasuite-user-manual/project_intro/scripts.md).

# Scripts

This section shows any Python scripts associated with the project/scenario. The `Scripts` accordion shows the following information per script (see [*Figure 15*](/iotasuite-user-manual/project_intro/scripts.md#Iota-Project-Scripts)):

* **Name**: name provided by the user to indentify the script.
* **Type**: "file/script". Provided for legacy reasons (script is now a dedicated type).
* **Filename**: name of the Python script (\*.py) file on the hard drive.
* **Scenario**: name of the scenario if the script is associated with a scenario.
* **Modfied**: last date the script was modified.&#x20;

![](https://3637271227-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ll27EH-tZ9C1wVq7SVN%2F-Ll27FcXY9XiJV180mCy%2F-Ll27K07SdsjaMIkKpiH%2Fiota-pm-Project_Scripts.PNG?generation=1564494353690370\&alt=media)  *Figure 15 - "Scripts" section of Iota*

## [Importing a Script](/iotasuite-user-manual/project_intro/scripts.md#importing-a-script) <a href="#importing-a-script" id="importing-a-script"></a>

Users can import Python scripts into the project/scenario by clicking on the `Import` button located at the right corner of accordion (see [*Figure 15*](/iotasuite-user-manual/project_intro/scripts.md#Iota-Project-Scripts)). A pop-up window will be shown so the user can enter the following fields for the file/script:

* **Name (required)**: a name for the script. If none is provided, the file name will be used.
* **Description (optional)**: a description for the script.
* **Scenario (optional)**: any scenario associated with the script.
* **Choose File**: the button opens a file browser window that allows users to select the Python script (\*.py) to be imported.

Note that the python scripts to be imported in this section must contain the function `def run(scenario):` defined in the .py file. See the documentation of the [Iota Python Library](https://legacy.gitbook.com/book/particle-analytics/iota-python-api/details) for a more detailed description of the functionality available from the provided by the scripting interface.

![](https://3637271227-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ll27EH-tZ9C1wVq7SVN%2F-Ll27FcXY9XiJV180mCy%2F-Ll27K09X-Xj0JLEWygB%2Fiota-pm-Scripts-Import-cropped.PNG?generation=1564494356362738\&alt=media)

*Figure 16 - Import Script window*

## [Editing a Script](/iotasuite-user-manual/project_intro/scripts.md#editing-a-script) <a href="#editing-a-script" id="editing-a-script"></a>

Clicking on the ![](https://3637271227-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ll27EH-tZ9C1wVq7SVN%2F-Ll27FcXY9XiJV180mCy%2F-Ll27K0BpfPfIfXOacnl%2Fic_edit_black_24dp_1x.png?generation=1564494354765002\&alt=media)Edit button launches a window where the user can rename the script.

## [Deleting a Script](/iotasuite-user-manual/project_intro/scripts.md#deleting-a-script) <a href="#deleting-a-script" id="deleting-a-script"></a>

Clicking on the ![](https://3637271227-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ll27EH-tZ9C1wVq7SVN%2F-Ll27FcXY9XiJV180mCy%2F-Ll27K0D7vB_mRJC0s2a%2Fic_delete_forever_black_24dp_1x.png?generation=1564494353995392\&alt=media)Delete button launches a window prompting the user to confirm deletion.

## [Running a Script](/iotasuite-user-manual/project_intro/scripts.md#running-a-script) <a href="#running-a-script" id="running-a-script"></a>

The scripts associated with the project/scenario are available in the [**Post-Analysis**](/iotasuite-user-manual/coarse_graining_intro/cg_setting_cg/cg_output.md) section of the Coarse-graining page so that users can select them to be automatically executed immediately after the coarse-graining run has completed. Also, the user can run scripts using the **Iota IPython Terminal** (for more details, see [**"Running Scripts"**](https://particle-analytics.gitbooks.io/iota-python-api/content/running_scripts.html) in the [Iota Python Library manual](https://legacy.gitbook.com/book/particle-analytics/iota-python-api/details).
