我在Python中有一个简单的脚本,在Rhino3D中运行。它显示了如下消息框:
import ctypes # An included library with Python install.
ctypes.windll.user32.MessageBoxA(0, "Your text", "Test", 1)此外,它只显示了我的每一个文本的第一个字母(标题和内容)。我该怎么解决呢?原因是什么?问题来自Rhino3D吗?

发布于 2022-08-15 16:12:19
我也有同样的问题。您的代码的解决方案是:
import ctypes # An included library with Python install.
ctypes.windll.user32.MessageBoxA(0, b"Your text", b"Test", 1)字符串应该是字节的,所以使用b''。我认为这个问题只出现在Python3中。
https://stackoverflow.com/questions/38302830
复制相似问题