I think I want to faze out external code.
The correct way to make sure paths are available to your code is to set the PYTHONPATH in maya or in your computer's environment variables
check the documentation here:
https://knowledge.autodesk.com/support/ ... 0-htm.html
Adding items to your Python path
To add items to your path in Python, do one of the following:
Set PYTHONPATH in your Maya.env file, or in your environment before you run Maya
Append to sys.path in your userSetup.py or other script once Maya is running.
Here is an example of appending sys.path
import sys sys.path.append( '/Users/jdoe/maya/Scripts' )
Note: userSetup.py must be located in the initial python path ( sys.path) in order to be run automatically at startup. The default Python path can be added to by setting the environment variable PYTHONPATH.
This will do a better job at making sure python packages are available to code run in Vetala than External Code does.