

























这是一个创建于 1991 天前的主题,其中的信息可能已经有所发展或是发生改变。
代码:
from ctypes import *
libc = cdll.LoadLibrary('msvcrt.dll')
libc.printf(c_char_p(b'Hello %d %.2f\n'), 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”
1 XIVN1987 2021 年 1 月 1 日找到一篇文章,上面说出现这种问题的原因是: |
2 XIVN1987 2021 年 1 月 1 日虽然在 jupyter notebook 中没有显示“Hello 16 2.30”,但在 jupyter.exe 终端中有显示,,能够验证代码的执行效果,,所以这个问题不算很严重 |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。