2011-03-29 32 views

回答

6

检查标准输入是否为tty设备。

在SH/bash中:

if [ -t 0 ]; then 

在Python:

相关问题