1

I have the following script.

try
            {
                PythonEngine.Initialize();

            using (Py.GIL())
            {
                
                using (PyScope scope = Py.CreateScope())
                {
                    
                    string fileContent = File.ReadAllText(Path.Combine(@"../../", ScriptName));
                    var file = PythonEngine.Compile(fileContent);

                    scope.Execute(file);
                    
                }

                    
            }

When I run this script, it runs without issues but when I see the task manager I see no python process. I want to know what process is executing this script?

1 Answer 1

0

Your application's process is executing the script: Python.Net uses embedding. Which in practice when running on Windows means Python.Net is going to load e.g. python39.dll, call Py_Initialize(), and so on. Which actually is exactly the same as what the interpreter executable, python.exe, does.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.