简体   繁体   English

Notepad ++中的NppExec无法处理sys.stdin

[英]NppExec in Notepad++ not handling sys.stdin

I am having trouble getting NppExec to handle this bit of code: 我无法让NppExec处理以下代码:

import sys
for inString in sys.stdin :
    print(inString)

When I type into the console nothing happens, and I have to terminate the process. 当我在控制台中键入内容时,什么也没有发生,因此我必须终止该过程。 I get a message that the process is still running. 我收到一条消息,指出该进程仍在运行。 When I run the program from Powershell it works as expected. 当我从Powershell运行程序时,它可以按预期工作。 Is there a way to fix this? 有没有办法解决这个问题?

Run the file, type your inputs and tape Ctrl z 运行文件,输入您的输入和磁带Ctrl z

Ctrl z closes the standard input (stdin) by sending EOF . Ctrl z通过发送EOF关闭标准输入(stdin)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM