Get project root directory

How to get path to root directory of current project?

We’ll likely be turning this into a commonjs module for Komodo 9, but as of now you can do:

var partSvc   = Cc["@activestate.com/koPartService;1"].getService(Ci.koIPartService);
var projectDirectory = partSvc.currentProject.liveDirectory;
alert(projectDirectory);
1 Like

Thanks, @nathanr!