Saving Python Script within Toolbox

358
1
Jump to solution
07-19-2013 07:16 AM
RustyRex
Occasional Contributor
When you create a python tool, you reference a .py file.  The tool has to reference that script to run.  So if you want to pick up the tool and take it somewhere else, you have to move the script as well and relink.  It seems like it would make sense to be able to store that script in the toolbox somehow.  Can you?  What good is a tool box if it cant hold all your tools?
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable
At 10.1, you can Python" rel="nofollow" target="_blank">http://resources.arcgis.com/en/help/main/10.1/index.html#//00... Toolbox (.pyt).  This contains everything in one script.

However, if you are still at 10.0, you will indeed need to keep the script with the toolbox.  Make sure you use relative paths in this case.

View solution in original post

0 Kudos
1 Reply
by Anonymous User
Not applicable
At 10.1, you can Python" rel="nofollow" target="_blank">http://resources.arcgis.com/en/help/main/10.1/index.html#//00... Toolbox (.pyt).  This contains everything in one script.

However, if you are still at 10.0, you will indeed need to keep the script with the toolbox.  Make sure you use relative paths in this case.
0 Kudos