How do I get monitor resolution in Python?

后端 未结 30 1085
深忆病人
深忆病人 2020-11-22 13:49

What is the simplest way to get monitor resolution (preferably in a tuple)?

30条回答
  •  隐瞒了意图╮
    2020-11-22 14:42

    If you're using wxWindows, you can simply do:

    import wx
    
    app = wx.App(False) # the wx.App object must be created first.    
    print(wx.GetDisplaySize())  # returns a tuple
    

提交回复
热议问题