Screenshot - 02282013 - 07:38:47 AM

After hacking my way through google search after google search, I wrote my very first python script. And it works!
I am triple-booting my mac, using rEFIt as a boot manager (it asks me which operating system I want to use when I boot up the computer). Sometimes I know I want to leave linux and immediately boot up into snow leopard, but I have to wait for the selection screen to appear and then choose my selection.
My simple little script allows me to edit the rEFIt configuration file before I reboot, changing the auto-boot OS. This will allow me to run the script, choose my default OS, reboot, and the computer will boot up into the OS of my choice without having to choose it in rEFIt’s GUI. …And since it’s written in python, I can run it in snow leopard as well to quickly boot back into linux.
Did I really need to write a script to do that? Not really. But it sure was a great learning experience. I really like python- it looks really nice, it’s easy to read, and in some ways a lot easier to use than bash.
I have a feeling this will be the first of many..!

Leave a Reply

Your email address will not be published. Required fields are marked *