Re: Python Xlib chokes on connection to Apple's Leopard X11
Re: Python Xlib chokes on connection to Apple's Leopard X11
- Subject: Re: Python Xlib chokes on connection to Apple's Leopard X11
- From: Andrew Farmer <email@hidden>
- Date: Wed, 25 Jun 2008 23:21:06 -0700
On 25 Jun 08, at 23:09, Bill Janssen wrote:
Just to note this:
http://pypi.python.org/simple/Python Xlib/
Breaks on attempting to connect, because it expects DISPLAY to have a
value which matches a particular regular expression.
Bill
So, I'm trying to come up with a patch for this. What's the right
way, using low-level socket calls, to connect to the X server, given
the "/tmp/launch-XXXXXX/:0" display value?
I've tried this (where "host" is the "/tmp/launch-XXXXXX/" string):
if (uname[0] == 'Darwin') and host.startswith('/tmp/'):
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
s.connect(host)
But I get error 38, 'Socket operation on non-socket'.
The :0 is part of the path.
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
s.connect("/tmp/launch-whatever/:0")
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden