Python solves terminal occupation

The terminal of the program will not be automatically closed during the running of the python program, and sometimes it will occupy some threads, resulting in resources that cannot be released, so we need to manually close the terminal when the program ends

import os

os._exit(0)

In this way, the terminal can be closed to avoid the problem of terminal occupation

Guess you like

Origin blog.csdn.net/Aaron9489/article/details/130572561