inline  

Inline::Python and exceptions?

Robert Barta
Mon, 09 Feb 2009 08:42:33 -0800

Hi folks,

Inline::Python works so far nicely for me (I'm testing python code
using a Perl test suite). But now I wonder how exceptions in the
Python guest code would materialize in the Perl host code?

When I try

   use Inline Python => <<'END';

   def xxx ():
       raise KeyError, "whatever"

   END

   eval {
       xxx();
   }

then I only see the Python exception, obviously cancelling the
evaluation.

How do you guys handle that?

\rho
  • Inline::Python and exceptions? Robert Barta