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: Bill Janssen <email@hidden>
- Date: Wed, 25 Jun 2008 23:09:54 PDT
- Comments: In-reply-to Bill Janssen <email@hidden> message dated "Wed, 25 Jun 2008 22:11:59 -0700."
> 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'.
Bill
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden