Bob Ippolito wrote:
On Jul 20, 2006, at 4:18 PM, Kevin Walzer wrote:If I were doing it I'd check for DISPLAY and look at the output of "/ usr/X11R6/bin/xauth list" to see if X11 is running.some fiddling in your main script if DISPLAY isn't set though.
Another option is some C code I found posted on the net somewhere. Rather than looking for DISPLAY, or xauth, it simply tries to connect to the X server. You get an error if it doesn't work.
I've only tested it on linux.
I even made a Python module out of it.
Code enclosed.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
[EMAIL PROTECTED]
IsX.tar.gz
Description: GNU Zip compressed data
_______________________________________________ Pythonmac-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/pythonmac-sig
