Set Windows command-line terminal title in Python

前端 未结 9 1963
攒了一身酷
攒了一身酷 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:34

    If starting the Idle-shell is an option instead of the cmd shell:

    idle.py [-c command] [-d] [-e] [-s] [-t title] [arg] ...
    
    -c command  run this command
    -d          enable debugger
    -e          edit mode; arguments are files to be edited
    -s          run $IDLESTARTUP or $PYTHONSTARTUP first
    -t title    set title of shell window
    

提交回复
热议问题