public IPythonModule GetModule(string name) { IPythonModule res; if (_modules.TryGetValue(name, out res)) { return(res); } if (_isDefaultDb && _langVersion.Major == 3) { // aliases for 3.x when using the default completion DB switch (name) { case "cPickle": return(GetModule("_pickle")); case "thread": return(GetModule("_thread")); } } if (name == BuiltinName2x || name == BuiltinName3x) { // Handle both names for builtins if the correct one was not // found above. var mod = BuiltinModule; if (mod != null) { return(mod); } } if (_inner != null && (res = _inner.GetModule(name)) != null) { return(res); } return(null); }
public IPythonModule GetModule(string name) { return(_sharedState.GetModule(name)); }