皆様ご助言ありがとうございました。
no_consoleモードの判定は、sys.__stdout__ にしました。
sys.executableではexe化したときに判定できないことがあるらしい