You are here

Introduction to Python

Introduction to Python

  • Python is one of the mostly used programming language in the world.
  • Python is a general-purpose interpreted, interactive, object-oriented, and high-level programming language.
  • Guido van Rossum created this during 1985- 1990.
  • Python is an open source programming language and its source code is available under the GNU General Public License (GPL).

Some key features of python –

  • Python is Interpreted: Python is processed at runtime by the interpreter. You do not need to compile your program before executing it. This is similar to PERL and PHP.
  • Python is Interactive: You can sit at a Python prompt and interact with the interpreter directly to write your programs.
  • Python is Object-Oriented: Python supports Object-Oriented style or technique of programming that encapsulates code within objects.

Installing Python

There are number of ways of installing Python.

  1.  Download official Python distributions from www.python.org
  2. Install from a package manager
  3. Install specialized distributions for scientific computing, Internet of Things, and embedded systems

The following paragraph explains step-by-step method to install Python on Windows, Linux and Mac systems:

  1. On Windows Operating System
  1. How to check if the python is already installed or not?

Type Python on the command prompt. If already installed then you will get Python prompt.

C:\ >Python

Python 3.10.0 (tags/v3.10.0:b494f59, Oct  4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)] on win32

Type help(), copyright() or license() for more information. Q to quit

>>>

Type ^z to exit the Python

>>> ^Z

C:\ >

To check version of Python installed

C:\ >python –version

Python 3.10.0

Installing Python

Windows does not include a system supported installation of Python. To make Python available, the CPython team has compiled Windows installers (MSI packages) with every release for many years. These installers are primarily intended to add a per-user installation of Python, with the core interpreter and library being used by a single user.

There are a number of different installers available for Windows, each with certain benefits and downsides. Source-click to read more https://docs.python.org/3/using/windows.html

The full installer contains all components and is the best option for developers using Python for any kind of project.

The Microsoft Store package is a simple installation of Python that is suitable for running scripts and packages, and using IDLE or other development environments.

The nuget.org packages are lightweight installations intended for continuous integration systems. It can be used to build Python packages or run scripts, but is not updateable and has no user interface tools.

The embeddable package is a minimal package of Python suitable for embedding into a larger application.

Procedure for full installer

  1. Check the type of your machine 32-bit or 64-bit. To check you can right-click on this PC and click properties or go to Control Panel\System and Security\System to check whether your machine is 32-bit or 64-bit
  2. Download correct and latest version installer for your machine from the python.org
  3. Double click the installer and the following screen appears

Select one of the options, check Install launcher and Add python 3.10 to PATH

Once Python is installed, IDLE, pip and documentation will also be installed on your system.

Modifying an install – source https://docs.python.org/3/using/windows.html

After the installation is complete, you can add or remove features through the Programs and Features tool that is part of Windows. Select the Python entry and choose “Uninstall/Change” to open the installer in maintenance mode.

The installer has the following options:

  • “Modify” allows you to add or remove features by modifying the checkboxes.
  • “Repair” will verify all the files that should be installed using the current settings and replace any that have been removed or modified.
  • “Uninstall” will remove Python entirely

Leave a Reply

Top
error: Content is protected !!