jupyter 中通过 ctypes 调用 printf()时,不显示 printf()打印内容
資深大佬 : XIVN1987 5
代码:
from ctypes import * libc = cdll.LoadLibrary('msvcrt.dll') libc.printf(c_char_p(b'Hello %d %.2fn'), c_int(16), c_double(2.3))
在标准交互环境中显示内容为:
Hello 16 2.30 14
在 ipython 中,显示内容为:
Hello 16 2.30 Out[31]: 14
在 jupyter 中,显示内容为:
Out[15]: 14
请问在 jupyter 中如何显示“Hello 16 2.30”
大佬有話說 (2)