I'm writing a C# application that can be scripted using IronPython. I'd like to be able to emit non-fatal Python warnings from C# code (that can be handled using the regular Python warning-catching system).
I've found the PythonWarnings.warn
method in IronPython.Modules
, but it requires a CodeContext
and I can't figure out how to create/get one of those.