X display visual

Randall Hopper aa8vb at yahoo.com
Wed Dec 8 15:50:01 EST 1999


Ivan Van Laningham:
 |Randall Hopper wrote:
 |> 
 |[snip]
 |>  |so I guess that means python took the first color visual type it
 |>  |found... is there a way to force it to use my 24 bit visual?
...
 |>   # Determine the depth, if non specified
 |>   if depth: assert depth in [ 8, 24 ]
 |>   else:     depth = root.winfo_depth()
 |> 
 |>   # Just force 24-bit
 |>   depth = 24
...
 |
 |1)  I don't follow the logic in solution 1, above:  it looks like you're
 |forcing the depth to 24 regardless of whatever you find out.

That's what was asked for ;-)  I left the sensing in there for hysterical
purposes, in case someone was interested.

 |2)  winfo_visualsavailable() doesn't work on Windows.  I can find out
 |the depth and get the visual string back, but I can't use
 |winfo_visualsavailable().  Here's the traceback:

Interesting.  IIRC, MSWin users are going to be limited to one visual at a
time.  The original poster was referring to a UNIX/X box so it'll work for
them.

-- 
Randall Hopper
aa8vb at yahoo.com




More information about the Python-list mailing list