Access to errno from Python?

前端 未结 6 1322
没有蜡笔的小新
没有蜡笔的小新 2020-12-29 05:00

I am stuck with a fairly complex Python module that does not return useful error codes (it actually fails disturbingly silently). However, the underlying C library it calls

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-29 05:36

    I'm not sure if this is what you and Jerub are referring to, but you could write a very short C extension that just exports errno, i.e. with the python language interface.

    Otherwise, I agree with you that having to add this small bit of compiled code is a pain.

提交回复
热议问题