1

I need to run two scrypt in two different Thread simultaneously. The first one is a loop capture of webcam stream, while the second is a loop animation, i'd like to run both simultaneously, but when i create the two thread only the first one start and the second wont. The two scrypt are both loop that end when Esc is pressed

This is the main scrypt:

import os

def videoStream():
    os.system('python cv2stream.py')

def expressions():
    os.system('python expression.py')
        
vs = threading.Thread(target=videoStream())
ex = threading.Thread(target=expressions())
vs.start()
ex.start()
vs.join()
ex.join()
Victor
  • 5,142
  • 4
  • 12
  • 29

0 Answers0