Trying to send an EOF signal (Ctrl+D) signal using Python via Popen()
问题 I'm trying to get Python to send the EOF signal ( Ctrl + D ) via Popen() . Unfortunately, I can't find any kind of reference for Popen() signals on *nix-like systems. Does anyone here know how to send an EOF signal like this? Also, is there any reference of acceptable signals to be sent? 回答1: EOF isn't really a signal that you can raise, it's a per-channel exceptional condition. (Pressing Ctrl + D to signal end of interactive input is actually a function of the terminal driver. When you press