Although I don’t know Komodo, I don’t think its standard input is interactive, so you can try
import sys
in_console = sys.__stdin__.isatty()
in_consoletrue if invoker provides interactive stdinand you get what you want, albeit not elegantly.
Evpok source
share