How to get all errors in ironpython script from C#?

Shamanthak Hegde 10 Reputation points
2023-04-05T20:26:32.2433333+00:00

Hi, I'm using IronPython in C# to run python scripts. I'd like to compile the ironpython script before executing to check for syntax errors. Using exception handling in C# retrieves only the first error. However I'd like get all the errors in the code, with it's message and position in the code. Could anyone help me with this?

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,339 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.