After having it suggested by Drew Flater and Ghislain Prince at the Esri UC, I am attempting to use the extending geoprocessing guidance to make a toolbox easily accessible to ArcMap and Python as a system toolbox, using distutils.
I created a toolbox with a model in it, ran the distutil stuff (I even figured out to create an msi to install it silently!).
I can run it from ArcMap. Here's my GP dialog
Executing: Foo
Start Time: Fri Sep 25 17:30:36 2015
Executing (Calculate Value): CalculateValue "chr(12)*3 + "Hello world" + chr(12)*3" # Variant
Start Time: Fri Sep 25 17:30:36 2015
Value = Hello world
Succeeded at Fri Sep 25 17:30:36 2015 (Elapsed Time: 0.08 seconds)
Succeeded at Fri Sep 25 17:30:36 2015 (Elapsed Time: 0.09 seconds)
All well and good. But I don't see in arcpy as promised.
(I thought this would be available from arcpy without ImportToolbox)
>>> arcpy.Foo_footbx()
Runtime error
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Foo_footbx'
Am I doing something wrong or does this only work with pyt files? The guidance seems to imply tbx files should work too.
I've attached a zip of my attempt. One thing not clear from the help - do I need to edit __init__.py or footbx.py? If so what goes there?