import os command="libcamera-jpeg --width 320 --height 240 -t 500 -n -o /tmp/img.jpg" while True: os.system(command)