trying to delay part of my program
问题 Im trying to take a snapshot of the webpage i open but i need to delay the second part of the code so that the program has time to open the page Here is the code import os import sys import time import Image import ImageGrab import webbrowser webbrowser.open_new(input("URL: ")) #Need to delay here SaveDirectory=r'C:\Documents and Settings\User\My Documents\My Pictures' ImageEditorPath=r'C:\WINDOWS\system32\mspaint.exe' img=ImageGrab.grab() box = (100, 100, 400, 400) region = img.crop(box)