'Which process runs python script running through python.net in C#
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?
Solution 1:[1]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | stijn |