/// <summary> /// Creates a new interpreter factory with the specified options. This /// interpreter always includes a cached completion database. /// </summary> public static PythonInterpreterFactoryWithDatabase CreateInterpreterFactory(InterpreterFactoryCreationOptions options) { var ver = options.LanguageVersion ?? new Version(2, 7); var description = options.Description ?? string.Format("Unknown Python {0}", ver); var prefixPath = options.PrefixPath; if (string.IsNullOrEmpty(prefixPath) && !string.IsNullOrEmpty(options.InterpreterPath)) { prefixPath = Path.GetDirectoryName(options.InterpreterPath); } return new CPythonInterpreterFactory( ver, (options.Id == default(Guid)) ? Guid.NewGuid() : options.Id, description, prefixPath ?? string.Empty, options.InterpreterPath ?? string.Empty, options.WindowInterpreterPath ?? string.Empty, options.LibraryPath ?? string.Empty, options.PathEnvironmentVariableName ?? "PYTHONPATH", options.Architecture, options.WatchLibraryForNewModules ); }