{$mode delphi}
uses process;
const res : array [boolean] of string = ('No Python','ok');
var s : string;
begin
writeln(res[runcommand('python.exe',['-V'],s)]);
end.
This might not give the desired/expected output because of Window$ caveats.
M$ hijacked this command: if you execute this command on a Win PC that does not even have Python installed, it opens some sort of marketplace page.
If you run the command after having installed Python, it still might give you the unexpected marketplace pop up, because of the search path.
When you (manually) move the Python path to the beginning of the environment path string, it will work.