skip to navigation
skip to content

Not Logged In

PyVirtualDisplay 0.1.0

python wrapper for Xvfb, Xephyr and Xvnc

Latest Version: 0.1.5

pyvirtualdisplay is a python wrapper for Xvfb, Xephyr and Xvnc

Links:
Features:
  • python wrapper
  • back-ends: Xvfb, Xephyr, Xvnc
  • supported python versions: 2.5, 2.6, 2.7, 3.1, 3.2, PyPy

Warning

at least one back-end should be installed

Known problems:
  • only a few back-end options are supported
Possible applications:
  • GUI testing
  • automatic GUI screenshot

Basic usages

Start Xephyr:

from pyvirtualdisplay import Display
xephyr=Display(visible=1, size=(320, 240)).start()

Create screenshot of xmessage with Xvfb:

from easyprocess import EasyProcess
from pyvirtualdisplay.smartdisplay import SmartDisplay
with SmartDisplay(visible=0, bgcolor='black') as disp:
    with EasyProcess('xmessage hello'):
        img = disp.waitgrab()
img.show()

Installation

General

  • install Xvfb or Xephyr or Xvnc.

  • install pip

  • optional: pyscreenshot and PIL should be installed for smartdisplay submodule

  • install the program:

    # as root
    pip install pyvirtualdisplay
    

Ubuntu

sudo apt-get install python-pip
sudo apt-get install xvfb
sudo apt-get install xserver-xephyr
sudo apt-get install tightvncserver
sudo pip install pyvirtualdisplay
# optional
sudo apt-get install python-imaging
sudo apt-get install scrot
sudo pip install pyscreenshot

Uninstall

# as root
pip uninstall pyvirtualdisplay
 
File Type Py Version Uploaded on Size
PyVirtualDisplay-0.1.0.tar.gz (md5) Source 2012-03-10 9KB
  • Downloads (All Versions):
  • 603 downloads in the last day
  • 5972 downloads in the last week
  • 19629 downloads in the last month