checking psutil.__version__ would require a version comparison import such as distutils since the req is 4.0.0. I don't think it worths the effort and catching the AttributeError is probably a good compromise. Keep in mind that this DISPLAY madness is just a one-time operation (session start or session resume).
Regarding member vs non-member, let's say that I prefer to hide it from globals...
checking psutil.__version__ would require a version comparison import such as distutils since the req is 4.0.0. I don't think it worths the effort and catching the AttributeError is probably a good compromise. Keep in mind that this DISPLAY madness is just a one-time operation (session start or session resume).
Regarding member vs non-member, let's say that I prefer to hide it from globals...