public string locateModule(string headName)
{
List<string> loadPath = getLoadPath();
foreach (string p in loadPath)
{
string startDir = FileSystem.CombinePath(p, headName);
string initFile = FileSystem.CombinePath(startDir, "__init__.py");
if (FileSystem.FileExists(initFile))
{
return p;
}
string startFile = FileSystem.CombinePath(startDir , suffix);
if (FileSystem.FileExists(startFile))
{
return p;
}
}
return null;
}