<p dir="ltr">On Jul 30, 2013 10:06 AM, "Chris Angelico" <<a href="mailto:rosuav@gmail.com">rosuav@gmail.com</a>> wrote:<br>
><br>
> On Tue, Jul 30, 2013 at 3:06 PM, Devyn Collier Johnson<br>
> <<a href="mailto:devyncjohnson@gmail.com">devyncjohnson@gmail.com</a>> wrote:<br>
> > Aloha everyone!<br>
> ><br>
> >    I attached a script that I thought I could share with everyone for your<br>
> > help. This Python3 script only works on Unix systems. It prints the current<br>
> > state of the lid. This can be used to make a script that performs some<br>
> > action when the lid is closed or open. The script is licensed under LGPLv3<br>
> > and I will soon upload it to my Launchpad account. Enjoy!<br>
><br>
> There's... no Python code in that. Why not simply<br>
> open("/proc/acpi/button/lid/LID/state") and read from it, instead of<br>
> using cat and awk?</p>
<p dir="ltr">Or for that matter, why not just make it a bash script instead of Python? It's kind of pointless to go to all the trouble of starting a Python interpreter just to have it start a subprocess.</p>