Inheritance: MonoDevelop.Projects.ProjectConfiguration
        public static string GetInterpreterArguments(PythonConfiguration config)
        {
            if (config == null)
                throw new ArgumentNullException ("configuration");

            var args = new ProcessArgumentBuilder ();
            args.Add ("-m");
            args.AddQuoted (config.MainModule);
            args.Add ("-u");

            if (config.Optimize)
                args.Add ("-O");

            if (config.LangVersion == LangVersion.Python30)
                args.Add ("-X:Python30");

            if (config.ShowExceptionDetails)
                args.Add ("-X:ExceptionDetail");

            if (config.ShowClrExceptions)
                args.Add ("-X:ShowClrExceptions");

            if (!String.IsNullOrEmpty (config.InterpreterArguments))
                args.Add (config.InterpreterArguments);

            return args.ToString ();
        }
        public static string GetInterpreterArguments(PythonConfiguration config)
        {
            if (config == null)
            {
                throw new ArgumentNullException("configuration");
            }

            var args = new ProcessArgumentBuilder();

            args.Add("-m");
            args.AddQuoted(config.MainModule);
            args.Add("-u");

            if (config.Optimize)
            {
                args.Add("-O");
            }

            if (config.LangVersion == LangVersion.Python30)
            {
                args.Add("-X:Python30");
            }

            if (config.ShowExceptionDetails)
            {
                args.Add("-X:ExceptionDetail");
            }

            if (config.ShowClrExceptions)
            {
                args.Add("-X:ShowClrExceptions");
            }

            if (!String.IsNullOrEmpty(config.InterpreterArguments))
            {
                args.Add(config.InterpreterArguments);
            }

            return(args.ToString());
        }
        // TODO - Research on the target runtime selection (if possible/doable/recommended).
        protected virtual PythonExecutionCommand CreateExecutionCommand(ConfigurationSelector configSel, PythonConfiguration configuration)
        {
            var ironPath = (FilePath)PropertyService.Get<string> ("IronPython.InterpreterPath");

            var command = new PythonExecutionCommand (ironPath) {
                Arguments = IronManager.GetInterpreterArguments (configuration),
                WorkingDirectory = BaseDirectory,
                EnvironmentVariables = configuration.GetParsedEnvironmentVariables (),
                Configuration = configuration
            };

            if (!String.IsNullOrEmpty (configuration.ExtraPaths))
                command.EnvironmentVariables [IronManager.ExtraPathsEnvironmentVariable] = configuration.ExtraPaths;

            return command;
        }
Example #4
0
        // TODO - Research on the target runtime selection (if possible/doable/recommended).
        protected virtual PythonExecutionCommand CreateExecutionCommand(ConfigurationSelector configSel, PythonConfiguration configuration)
        {
            var ironPath = (FilePath)PropertyService.Get <string> ("IronPython.InterpreterPath");

            var command = new PythonExecutionCommand(ironPath)
            {
                Arguments            = IronManager.GetInterpreterArguments(configuration),
                WorkingDirectory     = BaseDirectory,
                EnvironmentVariables = configuration.GetParsedEnvironmentVariables(),
                Configuration        = configuration
            };

            if (!String.IsNullOrEmpty(configuration.ExtraPaths))
            {
                command.EnvironmentVariables [IronManager.ExtraPathsEnvironmentVariable] = configuration.ExtraPaths;
            }

            return(command);
        }