Set Windows command-line terminal title in Python

前端 未结 9 1958
攒了一身酷
攒了一身酷 2020-12-01 00:52

I\'m running several instances of a certain Python script on a Windows machine, each from a different directory and using a separate shell windows. Unfortunately Windows giv

9条回答
  •  独厮守ぢ
    2020-12-01 01:42

    On Windows, a simple console command will suffice:

    from os import system
    system("title "+myCoolTitle)
    

    Nice & easy.

提交回复
热议问题