I have written a script for a tool (MyTool) in a toolbox (MyToolbox) used in ArcMap 10.6. In the script I like to get the path to the directory where the toolbox resides. Since we are distributing this tool, this path is a variable which will be different for each user.
For example if a user saves MyToolbox in C:\User\source\Workspaces directory, how can I get this directory in my script?