[Xcb-commit] XcbPythonBinding.mdwn
XCB site
xcb at freedesktop.org
Sun Jun 15 05:01:48 PDT 2008
XcbPythonBinding.mdwn | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
New commits:
commit 7b6b314ae6c0d85c8c8b63751ad08778052e5ee2
Author: XCB site <xcb at freedesktop.org>
Date: Sun Jun 15 05:01:47 2008 -0700
web commit by AstralStorm: Finally....
diff --git a/XcbPythonBinding.mdwn b/XcbPythonBinding.mdwn
index 8392776..61f69de 100644
--- a/XcbPythonBinding.mdwn
+++ b/XcbPythonBinding.mdwn
@@ -180,17 +180,13 @@ The above example doesn't include XAuthority file parsing. To parse that file, y
xauth={}
for xline in xauthdata:
- # byteswap to network order
+ # byteswap to network order and lose the \0-terminator
xline[3] = struct.pack("!%ds" % len(xline[3]), xline[3])[:-1]
xauth[":".join(xline[:2])] = ":".join(xline[2:])
# No host means localhost, add these entries
if xline[0] == "localhost":
- # byteswap to network order
- xline[3] = struct.pack("!%ds" % len(xline[3]), xline[3])[:-1]
- xauth[":".join(xline[:2])] = ":".join(xline[2:])
- if xline[0] == "localhost":
- xauth[":%s" % xline[1]] = ":".join(xline[2:])
+ xauth[":%s" % xline[1]] = ":".join(xline[2:])
Then to connect you can use the mapping xauth like this:
More information about the xcb-commit
mailing list