pyglet屏幕分辨率变成变量

问题描述:

有没有任何选择如何使用pyglet将屏幕变量值heightwidth变成变量?我可以打印它,但不能提取这些值。pyglet屏幕分辨率变成变量

import pyglet 

platform = pyglet.window.get_platform() 
display = platform.get_default_display() 
screen = display.get_screens() 

- >

>>> screen 
[XlibScreen(display=<pyglet.canvas.xlib.XlibDisplay object at 0x7f4644cf0990>, x=0, y=0, width=1366, height=768, xinerama=0)] 
>>> 

任何想法?提前致谢。

应该是这样简单:

platform = pyglet.window.get_platform() 
display = platform.get_default_display()  
screen = display.get_default_screen() 
screen_width = screen.width 
screen_height = screen.height 
+0

是的,现在我明白了。谢谢!! –