Interfacing with Python

There are 5 basic ways one can interact with computer code.

  • GUI (Graphical User Interface) – The one you are most familiar with is the GUI or the graphical user interface. This involves using the mouse and menus that allow one to point and click to execute commands. This is the preferred choice for end users who don’t want to get things done with the least amount of knowledge. One can build GUIs in any computing language. However, when writing code the use of GUIs is reduced in favor of text.
  • Terminal – The most basic interface with a computer is a terminal which only allows for the entering of text, no pointing and clicking. One can run python code from the terminal with python file.py or ./file.py depending on how your file is set up. Text can also be edited in the terminal with editor like Emacs and Vim.
  • Code Editors – Computing language are written with standard letters, so any text editor can write code. However, there are many text editors designed specifically for writing code. They include some understanding of syntax in the language so they can do things like indent and have syntax highlighting that makes the code easier to read. Code editors include Atom, Visual Studio Code, Sublime Text (not free), Notepad++, Emacs and Vim. Note that one can not run code in a code editor, the code you write must be run in the terminal or by other means.
  • IDE (Interactive Development Environment) – An interactive data environment not only includes a code editor, but also the ability to run the code in the environment. It also may include many other features like a debugger and the ability to check the status of variables in your code.  Basically, the IDE includes a bunch of tools that people feel will make your coding easier and is the most common choice for advanced coders. IDEs for Python include Spyder, PyCharm, Rodeo, and Visual Studio.
  • Notebooks – There are notebooks like the Jupyter notebook. A notebook is not only an IDE but it also allows for variables, and outputs of the code, for example figures to be stored in the notebook. Notebooks are particularly useful if you want to share not just the code, but additional data with someone else.
  • Web – Finally you can run python in a web application that doesn’t require you to have anything installed. This can be done via skulpt an in browser implementation of python. This can be embedded into a webpage with trinket. This can be nice if you don’t have access to a machine with python and want to try some code, or if you want to have some python code run on a webpage.