Jan-16-2020, 05:32 PM
Hi,
What's the difference between these two codes? Does one run faster than the other or it's just a question of correct format?
TIA
What's the difference between these two codes? Does one run faster than the other or it's just a question of correct format?
TIA
# Import modules from picamera import PiCamera import time if __name__ == '__main__': # Instantiate PiCamera object camera = PiCamera() # Sleep for 5 seconds before taking the photo time.sleep(5) # Take photo and save it as 'test.jpg' camera.capture('./test.jpg')
# Import modules from picamera import PiCamera import time # Instantiate PiCamera object camera = PiCamera() # Sleep for 5 seconds before taking the photo time.sleep(5) # Take photo and save it as 'test.jpg' camera.capture('./test.jpg')