I made a python script that would simple take and save a screenshot when ran. In the tutorial it said if I changed the file extension to .pyw it would still save a screenshot but it is not working. What might I be overlooking? I have it defaulted to run through pythonw and tried running it thought both programs on 2.7 and 3.6
from PIL import ImageGrab
import os
import time
x_pad = 69
y_pad = 23
def screenGrab():
box = (x_pad+1,y_pad+1,x_pad+1531,y_pad+877)
im = ImageGrab.grab( im.save(os.getcwd() + '\\screenshot' + str(int(time.time())) +
'.png', 'PNG')box)
def main():
screenGrab()
if __name__ == '__main__':
main()