Hi,
is there a way to catch the lid-close/lid-open signals from the system from within Python?
It's for my Xplanet frontend http://boards.openpandora.org/index.php/topic/11408-application-xplanet-with-custom-frontendlauncher/
The frontend uses pygtk. I'm running Xplanet as a subprocess with gogo=subprocess.Popen(...) when a toggle-button is pressed, and would like to stop it with gogo.terminate() when the lid is closed or re-start it when the lid is opened again.
I'd also be gratefull for additional hints on how to implement this, since I have no idea how I would go about monitoring for a signal or even key-press in python ...
thanks!
is there a way to catch the lid-close/lid-open signals from the system from within Python?
It's for my Xplanet frontend http://boards.openpandora.org/index.php/topic/11408-application-xplanet-with-custom-frontendlauncher/
The frontend uses pygtk. I'm running Xplanet as a subprocess with gogo=subprocess.Popen(...) when a toggle-button is pressed, and would like to stop it with gogo.terminate() when the lid is closed or re-start it when the lid is opened again.
I'd also be gratefull for additional hints on how to implement this, since I have no idea how I would go about monitoring for a signal or even key-press in python ...
thanks!
Last edited by a moderator: