[Tutor] Hi all: How do I save a file in a designated folder?
Michael C
mysecretrobotfactory at gmail.com
Tue May 2 14:09:01 EDT 2017
from PIL import Image
from PIL import ImageGrab
# takes the screenshot
screenshot = ImageGrab.grab()
# display the screenshot
screenshot.show()
# save the screenshot
screenshot.save("\test\missed.png")
This is my current code, using Python Image Library!
What I would like to get help with is:
1. How to name the file with time stamp. e.g. 05012017.png and so forth.
2. How to save it in a designated folder like C:\test\test2\ and so forth.
P.S. I am on windows 10
Thanks!
More information about the Tutor
mailing list