|Python| Open a new console by sub-process

How can we open a new console to do another thing at the same time?
(multi-thread programming)
Ans: use “subprocess

def openNewConsole():
    '''open new file in Host consol'''
    log = open("myLogFile.log", "w")
    '''Create a subprocess to do "adb logcat" and let stdout send to "log"'''
    ret = subprocess.Popen("adb logcat -v threadtime -b all", creationflags =subprocess.CREATE_NEW_CONSOLE, stdout=log)
    return ret