AnsweredAssumed Answered

using modules

Question asked by bschwarz on Mar 9, 2013
Latest reply on Mar 11, 2013 by curtvprice
I have a python script that I call from a custom control in ArcMap.

This script ( contains a number of functions and is the main script I run.

I have another script ( that I call from another control in ArcMap.  In this script, I import x so I can leverage some of the functions in

Unfortunately when I execute it can't locate x to import it.

Both of these scripts are in the same directory.

I did some reading ( and discovered that I can set a variable called PYTHONPATH to point to this directory and this should automatically be appended to sys.path; and thus it's my understanding that it should then be able to find the script to import. 

But alas, it did not work.

I do have a work around but that would mean repeating the same functions in each script and I'd prefer to avoid that duplication if possible.

Any help is appreciated.