Exemplo n.º 1
0
        public override int Run(string[] remainingArguments)
        {
            foreach (var environment in PythonEnvironment.EnumerateEnvironments()
                     .Concat(CondaEnvironment.EnumerateCondaEnvironments()))
            {
                Console.WriteLine(this.HomeOnly
                    ? environment.Home.FullName
                    : $"{environment.LanguageVersion?.ToString(2) ?? "??"}-{environment.Architecture?.ToString() ?? "???"} @ {environment.Home}");
            }

            return(0);
        }
Exemplo n.º 2
0
        public override int Run(string[] remainingArguments)
        {
            this.CheckRequiredArguments();
            if (remainingArguments.Length < 1)
            {
                throw new ArgumentNullException("python-executable");
            }

            var interpreter = new FileInfo(remainingArguments[0]);
            var environment = PythonEnvironment.FromInterpreterChecked(interpreter);

            Console.WriteLine("ver: " + environment.LanguageVersion);
            Console.WriteLine("exe: " + environment.InterpreterPath.FullName);
            Console.WriteLine("home: " + environment.Home?.FullName);
            Console.WriteLine("dll: " + environment.DynamicLibraryPath?.FullName);

            return(0);
        }