The idf.py menuconfig interface is garbled, because the menuconfig interface does not support Chinese gbk encoding, so after entering powershell, change the encoding to English to
execute the command: chcp 437
936 Simplified Chinese
437 MS-DOS English
After executing the command chcp 437 before modification
, the display effect
Modify idf.py and add code: os.system("chcp 437") In
this way, every time idf.py is started, the code is automatically modified
if __name__ == "__main__":
try:
# On MSYS2 we need to run idf.py with "winpty" in order to be able to cancel the subprocesses properly on
# keyboard interrupt (CTRL+C).
# Using an own global variable for indicating that we are running with "winpty" seems to be the most suitable
# option as os.environment['_'] contains "winpty" only when it is run manually from console.
WINPTY_VAR = "WINPTY"
WINPTY_EXE = "winpty"
os.system("chcp 437")
if ("MSYSTEM" in os.environ) and (
not os.environ.get("_", "").endswith(WINPTY_EXE) and WINPTY_VAR not in os.environ
):
Only this record