Python Show – Introduction to Interpreter

4 Min Read

People are mostly been talking about Python as a programming language. But, as currently implemented, it’s also a software package called an interpreter. An interpreter is a kind of program that executes other programs. When you write a Python program, the Python interpreter reads your program and carries out the instructions it contains. In effect, the interpreter is a layer of software logic between your code and the computer hardware on your machine.

When the Python package is installed on your machine, it generates a number of components—minimally, an interpreter and a support library. Depending on how you use it, the Python interpreter may take the form of an executable program, or a set of libraries linked into another program. Depending on which flavor of Python you run, the interpreter itself may be implemented as a C program, a set of Java classes, or something else. Whatever form it takes, the Python code you write must always be run by this interpreter. And to enable that, you must install a Python interpreter on your computer.

Python installation details vary by platform and are covered in more depth in next python show. In short:

  • Windows users fetch and run a self-installing executable file that puts Python on their machines. Simply double-click and say Yes or Next at all prompts.
  • Linux and Mac OS X users probably already have a usable Python preinstalled on their computers—it’s a standard component on these platforms today.
  • Some Linux and Mac OS X users (and most Unix users) compile Python from its full source code distribution package.
  • Linux users can also find RPM files, and Mac OS X users can find various Mac-specific installation packages.
  • Other platforms have installation techniques relevant to those platforms. For instance, Python is available on cell phones, tablets, game consoles, and iPods, but installation details vary widely.

Python itself may be fetched from the downloads page on its main website, http://www.python.org. It may also be found through various other distribution channels. Keep in mind that you should always check to see whether Python is already present before installing it. If you’re working on Windows 7 and earlier, you’ll usually find Python in the Start menu, as captured in picture below; we’ll discuss the menu options shown here in the next show. On Unix and Linux, Python probably lives in your /usr directory tree.

Python command line
Python command line

When installed on Windows 7 and earlier, this is how Python shows up in your Start button menu. This can vary across releases, but IDLE starts a development GUI, and Python starts a simple interactive session. Also here are the standard manuals and the PyDoc documentation engine (Module Docs). In next show we’ll discuss about for pointers on Windows 8 and other platforms.

Share This Article
Leave a comment