Package Third-Party Module with Python Addin

890
2
Jump to solution
11-15-2013 05:29 AM
JohnDye
Occasional Contributor III
Does anyone know how I would go about packaging a third-party Python Site Package with an addin.

I want to package SendKeys with my addins so that I can implement a programmatic method of Pause Drawing (F9) and forcing the Continuous Zoom Tools, the little magnifying glass ones in ArcMap, to honor Reference Scales established in the MXD (CTRL).

I'm confused as to whether I should put the Site Package into the Data Folder in a subfolder named 'Site Packages' or if I should just drop the .py file into the Root Folder of the addin.

From there, I'm also not sure how to import the module into the script...

Any suggestions would be greatly appreciated!
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
JasonScheirer
Occasional Contributor III
If sendkeys is just a single .py file, you should be able to just drop it in the Install\ directory of your add-in project and it will be importable from your add-in .py, and it will be bundled in the .esriaddin when you package it.

View solution in original post

0 Kudos
2 Replies
JasonScheirer
Occasional Contributor III
If sendkeys is just a single .py file, you should be able to just drop it in the Install\ directory of your add-in project and it will be importable from your add-in .py, and it will be bundled in the .esriaddin when you package it.
0 Kudos
JohnDye
Occasional Contributor III
If sendkeys is just a single .py file, you should be able to just drop it in the Install\ directory of your add-in project and it will be importable from your add-in .py, and it will be bundled in the .esriaddin when you package it.


That worked! Thanks Jason!
0 Kudos