Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经安装了 Python 2.7.3 和 PyScripter。当我尝试运行这个简单的代码时,interupter 没有显示任何内容:
from ctypes import * msvcrt = cdll.msvcrt message_string = "Hello world!\n" msvcrt.printf("Testing: %s".encode('ascii'), message_string.encode('ascii')
(也试过没有编码)
在交互式外壳中为我工作:
>>> msvcrt.printf("Testing: %s".encode('ascii'), message_string.encode('ascii')) Testing: Hello World! 22
尝试将其放入 .py 文件中,然后从 cmd 运行
python C:\path\to\file