This commit is contained in:
2024-11-29 18:15:30 +00:00
parent 40aade2d8e
commit bc9415586e
5298 changed files with 1938676 additions and 80 deletions

View File

@ -0,0 +1,14 @@
"Create screenshot of xmessage with Xvfb"
from time import sleep
from easyprocess import EasyProcess
from pyvirtualdisplay import Display
import pyscreenshot as ImageGrab
with Display(size=(100, 60)) as disp: # start Xvfb display
# display is available
with EasyProcess(["xmessage", "hello"]): # start xmessage
sleep(1) # wait for displaying window
img = ImageGrab.grab()
img.save("xmessage.png")