开发者

Python ctypes: How do I flush output from stderr?

开发者 https://www.devze.com 2023-03-12 00:41 出处:网络
I\'ve written some function callbacks using python\'s ctypes to access functions in a DLL.The code used to build that DLL has some debugging print statements in it using fprintf to stderr.However, whe

I've written some function callbacks using python's ctypes to access functions in a DLL. The code used to build that DLL has some debugging print statements in it using fprintf to stderr. However, when I run my python code, I don't see that output to stderr consistently. Only rarely I will see it flush the output from stderr to the console that I'm using. I've开发者_运维技巧 tried running it with "python -u foo.py", but that doesn't help either. Any suggestions?


It's all the same stderr.

sys.stderr.flush()
0

精彩评论

暂无评论...
验证码 换一张
取 消