whats the difference between subprocess popen and call

https://stackoverflow.com/questions/7681715/whats-the-difference-between-subprocess-popen-and-call-how-can-i-use-them

 

  • call is blocking:

    call('notepad.exe')
    print('hello')  # only executed when notepad is closed
    
  • Popen is non-blocking:

    Popen('notepad.exe')
    print('hello')  # immediately executed
posted on 2024-07-12 11:16  guolongnv  阅读(6)  评论(0)    收藏  举报