importing wxPython without an environment DISPLAY variable

If you do need to run wxPython on a 'headless' machine,
start a VNC server on that machine. On Linux, VNC uses
Xvnc to provide an XWindows compatible server and frame
buffer.

/Jean Brouwers
  ProphICy Semiconductor, Inc.

PS) VNC is available from several places, for example
<www.TightVNC.com> or <www.RealVNC.com>.

Paulo Neves wrote:

···

I have some unit tests of wxPython classes. The tests run fine from the
command line, but they also must be automatically run everyday by a
cronjob. The problem is that import of wxPython module fails if there
isn't a DISPLAY environment variable set:

unset DISPLAY
python

Python 2.3.3 (#1, Feb 10 2004, 18:02:03)
[GCC 3.2 20020903 (Red Hat Linux 8.0 3.2-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

from wxPython.wx import *

Gtk-WARNING **: cannot open display:

Does anyone know how I can run the tests without a display variable?

regards,