For more information on concepts covered in this lesson, you can check out:
How to Customize Python IDLE
00:12 If you don’t like how anything looks, then you can almost always change it. To access the customization window, select Options → Configure IDLE from the menu on Windows and Linux, or IDLE → Preferences on macOS.
00:44 There are multiple ways to customize IDLE. This lesson will focus on five of them: fonts, highlights, keys, windows, and shell and editor. Extending the functionality of IDLE is a subject all on its own.
01:23 You can use the scrolling window to select the font you prefer. I recommend you select a fixed-width font, such as Courier New or any of the freely available dedicated programming-orientated fonts, which are clear, fixed-width, and have other features dedicated to clean-looking code editing. Pick a font size that’s large enough for you to see well.
02:48 You’ll be brought to a color picker where you can select the exact color that you want to use. You’ll then be prompted to save this theme as a new custom theme, and you can enter a name of your choosing.
03:08 The third customization tab lets you map different keypresses to actions, also known as keyboard shortcuts. These are a vital component of your productivity. Whenever you use an IDE, you can either come up with your own keyboard shortcuts, or you can use the ones that come with IDLE.
The pre-installed shortcuts are a good place to start. The keyboard shortcuts are listed in alphabetical order by action. They’re listed in the format
action is what will happen when you press the key combination in
03:49 The customization of keyboard shortcuts is very similar to the customization of syntax-highlighting colors. Unfortunately, IDLE doesn’t allow you to install custom keyboard shortcuts from a file.
04:00 You must create them from the Keys tab. Select one pair from the list and press Get New Keys for Selection. A new window will pop up. Here, you can use the checkboxes and scrolling menu to select the combination of keys that you want to use for the shortcut on-screen.
You can see the
dedent command being changed to use Shift and Tab, which is consistent with many other editors. As with highlights, once you create a custom key entry, you’ll be prompted to save a new custom key set, as seen on-screen.
04:34 The fourth tab of the customization window is a place for small general changes. Here you can customize things like the window size and whether the shell or the file editor opens first when you start Python IDLE.
04:47 Most of the things in this window are not that exciting to change, but they will be useful when you do need them. This window will also let you change how many spaces are used for each indentation level. By default, this will be set to the PEP 8 standard of four spaces.
Become a Member to join the conversation.