I have a class of static methods that I wrote as a supplement to the AutoKey API. I would like to include these in my scripts that I write in the autokey editor, but I've not been able to quite figure it out yet as my experience with python is still limited.
Where do I put my class-name.py file to be able to import it into autokey?
You just need to store all the python modules you're going to use with autokey under the same folder and select that folder as the
User Module Folder
inPreferences -> Script Engine
.For example, in the image below I've set
~/autokey
as the directory where my helper modules are available:Note: The advice in the comments regarding changing
PYTHONPATH
/sys.path
are also correct. TheUser Module Folder
configuration basically appends the folder you select tosys.path
to make the user modules available to your autokey scripts.