Home Articles Categories Series
Pythonise Just now

Python Tools | Learning Python Pt. 1

Installing a text editor and terminal emulator for working with and running Python files

Article Posted on by in Python
Julian Nash · 2 years ago in Python

In the first part of the "Learning Python" series, we're going to be installing 2 free tools which we'll be using throughout this series.

We're going to install the following:

  • An editor (Visual studio code)
  • A terminal emulator (Cmder)

The editor is the tool we're going to use to write our Python code and the terminal emulator is used to navigate the filesystem, run commands and work with Python.

We've decided to use these 2 tools for the following reasons:

  • Cross platform (Works on all operating systems including Windows, Mac & Linux)
  • They're free
  • They're good!

If you're already using an editor or terminal that you like, feel free to skip the installation and use your own!

Likewise, if you're already comfortable using the Windows command prompt, Powershell or the terminal on Mac or Linux, you may want to skip the installation too.

Installing VS Code

Visual studio code is a free, cross platform text editor with a rich plugin/extension ecosystem and works great with Python.

Visual Studio Code Python editor

To install it, head over to https://code.visualstudio.com/ and click on the Download button at the top of the page.

Once downloaded, click on it to run the installer and follow the installation instructions, making sure to:

  • Tick both of the "Add open with code" options
  • Tick "Register code as an editor"

These options just allow quick access of opening VS Code with a right click on a file or directory.

Tip - Pin VS Code to your taskbar for quick access

Once it's installed, it should open up by default. If not, just search for it on your machine and open the application.

VS Code Python extension

The VS Code extension system allows us to add functionality to the editor by installing plugins.

In the sidebar on the left of the editor, click on the bottom icon to upen up the extension explorer and search for "Python".

You'll see the official Microsoft extension in the search results. Click on it and select install.

The Python extension will highlight syntax, offers code completion and some other useful features for working with Python files.

Now that we've got an editor to write out code in, let's grab the terminal emulator.

Installing Cmder

The terminal is what we'll use to interract with our machine and allows us to navigate our filesystem, create, copy, edit, move & delete files, along with running Python (and a whole lot more). Think of it as a text based version of the mouse.

Cmder terminal emulator

If you've never used a text based terminal before, don't worry! I know it can be quite intimidating at first but trust me, it'll become your best friend in no time! The basic commands are very easy to learn and you can do things in the terminal that you simply can't do with a mouse and graphical interface.

We're using Cmder as it's one of the best terminal emulators available and just allows us to get on with the task at hand.

To install Cmder, head to https://cmder.net/ and download the full version (as it comes with Git for Windows).

Once downloaded, extract the files and finally, click on the "Cmder" icon to launch it.

Tip - Pin Cmder to your taskbar for quick access

The terminal will open and you can now navigate your filesystem using the familiar Linux/Bash commands, including:

  • ls - Lists the contents of the current directory
  • cd <directory_name_or_path> - Changes into the specified directory
  • touch <filename> - Creates a file
  • mkdir <directory_name> - Creates a new directory
  • rm <filename> - Removes a file
  • rmdir - Removes a directory

Of course these are just a tiny fraction of the commands available. We'll be covering more in this series.

Finishing up

This was just a quick quide to help you install the tools we're going to be using throughout this series.

Feel free to explore VS Code and Cmder and play with some of the styling options to suit your taste. Both applications feature a lot of customization tools so I'm sure you'll find something you like!

In the next part of the series, you'll learn how to create and run Python files along with a few more handy commands when working with the Cmder terminal and Python.

Last modified · 27 Feb 2019
Did you find this article useful?
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License