internal void AddScriptCode(ScriptCode code) { OnDiskScriptCode onDiskCode = code as OnDiskScriptCode; if (onDiskCode != null) { if (onDiskCode.ModuleName == "__main__") { _codes["__main__"] = onDiskCode; } else { string name = code.SourceUnit.Path; name = name.Replace(Path.DirectorySeparatorChar, '.'); if (name.EndsWith("__init__.py")) { name = name.Substring(0, name.Length - ".__init__.py".Length); } _codes[name] = onDiskCode; } } }
internal ModuleLoader(OnDiskScriptCode sc, string parentName, string name) { _sc = sc; _parentName = parentName; _name = name; }