How to use python to get the screen(connected to TX2 ) resolution ?

at win32 platform we can use windows’ api

for ubuntu (arm 64) i wander how to use python to get the screen resolution

thx by my heart!

You might use this command:

sudo cat /sys/kernel/debug/tegradc.0/mode
# OR:
sudo egrep '(h_active|v_active)' /sys/kernel/debug/tegradc.0/mode

These could be adapted for use in python.

谢谢!