Jump to content
Sign in to follow this  
gmbouwer

Getting exitcode (%errorlevel%) of python script

Recommended Posts

Hi

 

Apologies if this has an obvious answer but it seems I don't know what to search for. Please refer me to previous posts or any existing documentation.

 

I need to get the exitcode (%errorlevel%) value of a python script. 

function ExecPython(lines: TStrings): integer
begin
try
  PythonEngine1.ExecStrings(lines);
  result := 0;  // success
except
  on E: Exception
    result := GetLastError()
end
end;

 

I'm using older version of Delphi.

 

Regards

gmb

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×