• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Python Xlib chokes on connection to Apple's Leopard X11
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Python Xlib chokes on connection to Apple's Leopard X11
      • From: Andrew Farmer <email@hidden>
References: 
 >Python Xlib chokes on connection to Apple's Leopard X11 (From: Bill Janssen <email@hidden>)

  • Prev by Date: Python Xlib chokes on connection to Apple's Leopard X11
  • Next by Date: Re: Python Xlib chokes on connection to Apple's Leopard X11
  • Previous by thread: Python Xlib chokes on connection to Apple's Leopard X11
  • Next by thread: Re: Python Xlib chokes on connection to Apple's Leopard X11
  • Index(es):
    • Date
    • Thread