📜  重命名控制台 python 代码示例

📅  最后修改于: 2022-03-11 14:46:24.232000             🧑  作者: Mango

代码示例1
# if you are on windows:
import os
os.system("title " + "YourNewTitle")

#else:
import ctypes

kernel32 = ctypes.WinDLL('kernel32', use_last_error=True)
kernel32.SetConsoleTitleW(u"YourNewTitle")