This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import picamera | |
cam = picamera.PiCamera() | |
cam.capture('aa.jpg') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subprocess.call("mv a.jpg pics/a.jpg", shell=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
countFile = open("counter.txt","r") # opens file to read | |
count = countFile.read() # reads | |
intCount = int(count) # converts to int | |
print intCount | |
intCount = intCount + 1 # increases | |
countFile = open("counter.txt","w") # opens file to write | |
countFile.write(str(intCount)) # writes | |
countFile.close() # close file |