Iron Python Exit code

Oct 3, 2008 at 10:38 AM
Hai,

I am embedding IronPython with C# application.I am executing python scripts(.py) through Iron Python Engine. I want to know how to print  Script Exit code value in C#.

I tried with this function

private int GetEffectiveExitCode(SystemExitException e) {
            object nonIntegerCode;
            int exitCode = e.GetExitCode(out nonIntegerCode);
            if (nonIntegerCode != null) {
                Console.WriteLine(nonIntegerCode.ToString(), Style.Error);
            }
            return exitCode;
        }


But,it shows error with  The type or namespace name 'SystemExitException' could not be found .

How can i solve my problem?


thanks &Regards
Chalumuri Mutyala Naidu




Oct 3, 2008 at 12:32 PM

Hai,

I am embedding IronPython with C# application.I am executing python scripts(.py) through Iron Python Engine. I want to know how to print Script Exit code value in C#.

I tried with this function

private int GetEffectiveExitCode(SystemExitException e) {
object nonIntegerCode;
int exitCode = e.GetExitCode(out nonIntegerCode);
if (nonIntegerCode != null) {
Console.WriteLine(nonIntegerCode.ToString(), Style.Error);
}
return exitCode;
}


But,it shows error with The type or namespace name 'SystemExitException' could not be found .

How can i solve my problem?


thanks &Regards
Chalumuri Mutyala Naidu


Larsen & Toubro Infotech Ltd.

www.Lntinfotech.com

This Document is classified as:

L&T Infotech Proprietary L&T Infotech Confidential L&T Infotech Internal Use Only L&T Infotech General Business

This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.
______________________________________________________________________