Python: lifehacks for setting up a programming environment

Once you’ve installed Python on your computer, it’s best to take care of the little nuances that make life easier for programmers. Let’s go through the basic settings of the programming environment and Windows for comfortable work:

1. Changing System Environment Variables

This setting will allow you to run a program written in Python in the CMD of the Windows operating system (command line interpreter). To do this, click “Start” -> Change system environment variables:

In the “Advanced” section, click on “Environment Variables” below:

Select the “Path” variable and click “Edit”:

Here you need to enter an additional value for the Path variable. We leave everything that was written as it is, and after exactly with a comma we attribute the path to the folder in which Python is installed. In my case it is C:\Python31

Thus, if we want to run the program through the Windows interpreter, we find cmd.exe and everything should work:

2. Open the selected file when opening a Python IDLE program

By default, opening Python IDLE launches a new programming environment window. We usually write our program in a file with .py permission – for example, in my case it is

Right-click on the Python IDLE icon, and select “Properties”:


In the “Shortcut” section, you need to add the path to the file that you want to open when starting the program after the existing text in quotation marks:

This method is also suitable for any program. For example, if you want to launch a specific file when opening Photoshop or Word, then the procedure for assigning a file is similar.

3. Night mode in the Python IDLE programming environment window

To make your eyes less tired when working, you can choose a “dark” theme. To do this, go to Python IDLE, press Options -> Configure IDLE from the top

Go to the Highlights section and select one of the built-in code highlighting themes (Highlighting theme -> a Built-in Theme). The dark theme is called IDLE Dark:

This entry was posted in Python (en). Bookmark the permalink.

Leave a Reply

🇬🇧 Attention! Comments with URLs/email are not allowed.
🇷🇺 Комментарии со ссылками/email удаляются автоматически.