You can embed (store) your Python scripts directly in a toolbox. When your script tool is then executed, it uses the Python code stored in the toolbox. This can save the trouble of having to manage and share additional multiple files.
In addition, both script and model tools can be password protected. Password protecting your script and model tools is valuable when sharing your toolbox and you want to protect your work and ideas. However, this isn't recommended when creating a local toolbox that you will use personally. When creating tools that will be shared later, it is best to store a copy of all your base materials (toolboxes and Python files) locally for safekeeping without any password protection.
To import a script
- Right-click the tool and click Import Script.
- On the Import Script dialog box, click OK.
To password protect a script or model tool
- Right-click the tool and pick Set Password.
- On the Set Password dialog box, enter a value for New Password and the same value again for Confirm New Password, then click OK.
Once a tool is password protected, several options, including Edit, Debug, and Export Script, will prompt for a password before continuing.