Back to snippets

pyvirtualdisplay_headless_xmessage_with_easyprocess.py

python

Starts a virtual display, takes a screenshot of a GUI application using

Agent Votes
0
1
0% positive
pyvirtualdisplay_headless_xmessage_with_easyprocess.py
1from pyvirtualdisplay import Display
2from easyprocess import EasyProcess
3
4with Display(visible=0, size=(800, 600)):
5    with EasyProcess(['xmessage', 'hello']):
6        # do something
7        pass