I’ve been working my way through the first set of the Matasano Security Challenge. In the process, I’ve been [re]teaching myself Python, and getting back into “real” code. One of the hurdles I’ve faced has been the disparity of documentation among Python versions, and even installations. I chose Python for the MSC because I hoped it would be device- (and OS-) agnostic. While it is to some extent, the mac comes with Python installed, and it’s a bad idea to mess with the internal OS-level functionalities.
With that in mind, I downloaded Python 2.7 and 3.4 (with IDLE for both). I chose to use 2.x, as the documentation for 2.x should be plentiful. Plus, since I’ll already have to wade through information that may be older, I’d like to take advantage of some of the clues I might get from older posts without having to mess with syntax changes of a major revision. One of the first problems I encountered was trying to figure out some keyboard shortcuts. The answer seemed simple: just look in Options / Configure Python. Except my “Options” menu only showed “Configure Extensions”, and it was grayed out. (I don’t have any extensions for Python installed.)
This would prove a recurring issue. Many times the answer centered around “Just change the configuration in Options.” and yet I had no way to do that. So, in the future I’ll discuss how I changed the font and size for my IDLE windows, but the most helpful thing was the keyboard shortcuts. It would appear that by looking in the menu for IDLE that I could use “Control”+”3” to comment (for example) – as “Control” is denoted by the caret in the shortcut key column of the menus. Strangely, until today, it required pressing both “Option” and “Control” keys.
The timing was perfect though, as today I was looking up how to reuse previously entered commands in the IDLE GUI, and found the answer on StackExchange. While bash lets me use the up/down arrows, IDLE will review previous commands with “Control”+”n” or “Control”+”p” (for next and previous, respectively.
I’m going to try to list things that I find helpful – so that I can look them up if the time comes when I forget… but also to share what was useful to me with anyone else who stumbles across the info here.