The Python programming language
Python is a very versatile scripting language. It is suitable for solving a variety of programming problems and many platforms such as Web, iOS, and Android, as well as solving engineering and scientific problems and software for server platforms.
The advantages of Python over other programming languages.
It is an interpreted language – it does not compile, i.e it is a plain text file before release. You can program on all modern platforms. Python is well designed with simple, laconic syntax and clear logic.
Developing programs in Python is faster than other programming languages because less code is generated in Python than in other popular programming languages. For these reasons, Python is well suited for beginners and specialists with no programming knowledge, as anyone, given time, can master Python for their basic process needs within a few months. With it you can start the path of a programmer, passing any of the many online practical courses on programming in the Python language.
How the Python language is used in software and website development
The Python language is used to develop web sites and applications, applications for mobile devices, for data analyzers, in applications and programs related to machine learning (neural networks, scientific calculations and artificial intelligence), as well as embedded scripts in various applications for computers and networks. Python is often used to create an operating system for server systems.
Development of websites and web applications in Python
Python is most commonly used in web development to build websites and web applications. To work with it, frameworks are connected: Django, Pyramid, Pylons, TurboGears, Flask, Cherrypie.
There are also engines to create websites in Python:
Abelian SBE;
Her;
Saleor;
Wagtail;
Django-CMS.
Parsers are also written in Python to collect data and information needed on the Internet.
Software and application development in Python.
The Python language does not compile, but is used to successfully create desktop programs and applications for various calculations.
The following programs and applications have been developed in the Python programming language:
GIMP – an alternative open source graphics editor for Windows and Linux;
Ubuntu Software Center – an application center in the Ubuntu operating system (one of the Linux distributions);
BitTorrent – torrent download manager (later the program was rewritten in C++, but peer-to-peer networks still work in Python);
Blender – a program for creating 3D graphics.
Anki – a program for memorization. The program uses the spaced repetition method so that the user can easily memorize the necessary information (new words, formulas, answers to tests and more).
Caliber – a digital library and book reader. The program allows viewing, converting and editing books of various formats, in addition, it supports direct work with various electronic books.
And a number of other successful projects developed using the Python language.
Mobile applications developed in Python
Mobile applications, although Python and a cross-platform programming language, are developed much less frequently due to the fact that applications created in Python work a little more slowly than in the native languages Swift and Kotlin, which were created especially to work with certain platforms. iOS and Android phones and with specific mobile device architectures for these mobile operating systems. For Android, they often write in Java, C#, C++, or Kotlin, and for iOS – in Swift or Objective-C. The back end of a mobile app is usually written in Python. For example, the front end of the Instagram app for iOS is written in Objective-C, and the back end is written in Python.
Games developed in Python
Many computer games were written in whole or in part in Python, which adds a significant part to the popularity of the Python language when choosing a language for developing game applications. There is a persistent misconception that this language is not suitable for large game projects, but in fact, Python has been used in the development of many popular games for both online and console devices.
Some of the most famous games that have used Python in one way or another are:
Battlefield;
World of Tanks;
Civilization IV;
Mount & Blade;
EVE Online;
The Sims 4.
Battlefield
This game uses Python for a variety of purposes, from server controls to internal game logic. The Battlefield is one of the most popular Action, Shooter, First Person and War Simulator games for PC and XBox which is well known all over the world.
EVE Online
It is a space-based massively multiplayer online role-playing game (MMORPG) set in a science fiction universe. The user base has more than 500,000 players. EVE Online is written entirely in Stackless Python, making it one of the biggest online games that uses Python for its own needs.
Mount & Blade
(2008-2012 / developer The Tale Worlds)
A role-playing, action and strategy game set in the Middle Ages. The first edition of the game was developed by a small game studio, they used Python scripts to ensure the modularity of the game. The game features a huge fantasy game world (strategy) and epic real-time first-person battles (RPG/Action). The Mount & Blade game was a great success among fans of strategy and RPGs, as well as fans of medieval battles and the life of medieval knights. And today, fans of the game continue to play the game Mount & Blade and independently publish unofficial updates to the game.
Sims 4
(2014 / developer EA Maxis Sims Studio)
It is one of the most famous games for PC in the life simulation genre. The Sims 4 is the first PC game to have reached the top spot on all sorts of game charts for several years, selling 408,150 copies worldwide in its first week of release. With over 1.1 million copies sold worldwide to date, The Sims 4 is one of the best-selling games that uses the Python language, to provide in-game modding that offers users a huge amount of customization options. Fans of the game continue to play it today with no less enthusiasm.
Civilization IV
(2005 / developer The Firaxis Games )
This is a great classic turn-based strategy game for PC. The goal of the player is to become the best ruler in the game world, defeat all rivals using the methods of diplomacy, war, cultural and scientific influence. Most of the Civilization IV gameplay is written in Python, and Boost Python, which allows users to create mods for the game with their own hands.
Frets On Fire (Fofo)
(2006 / developer Unreal Voodoo)
A free and open source music game that mimics the commercial game Guitar Hero. The game is written entirely in Python using the Pygame library. Due to the openness and simplicity of the code, the game seems to be a good platform to learn and practice programming.
Despite the possibility of implementing a user interface and working with graphics in Python, the scripts are mainly written in Python – for example, the interactions of the characters, the activation of scenes, as well as the handling of events and collections of various attributes.
Artificial intelligence developed in Python
Python is a leader in machine learning. It can be either the main language of the project or used in separate project modules.
The most popular are AIs that work with photos, audio files, and videos (search by photo, edit video and photo, match different photos, and so on). Programmers can even teach a computer to determine a person’s emotional state from a photograph, although there are still some problems associated with the individual characteristics of different people’s facial expressions.
The abundance of Python libraries makes it easy to create AI that can navigate in space, make decisions, and perform tasks that are inaccessible to humans. One of the newer AIs written in Python is AlphaStar, an AI for StarCraft 2.
The developers used PySC2, a tool written in Python specifically for StarCraft 2.
The complexity of the AI’s work in this game lies in the fact that the computer needs to perform many different tasks and evaluate many goals: scouting the enemy, determining its strategy, adjusting its gameplay to it, making optimal decisions about the movement of the army , and much more.
An embedded systems development in Python
Python is used to develop embedded systems for various devices. For example, the language has taken root in the Raspberry Pi (a computer the size of a memory card) and in various banking institutions known for operating ATMs.
More projects with an embedded system in Python:
The python system incorporated by the owl;
Python built-in tools;
Embedded Python.
The Python language is used in embedded systems for CNC machines, automatic controls (temperature, fluid flow, pressure, etc.), and telecommunications equipment.
Creation of various scripts in the Python language
Python is suitable for writing plugins and scripts for ready-made programs. For example, to implement game logic or create additional modules. Python scripts are incorporated into programs in other languages as templates to automate tasks.
Where else is the Python programming language used?
Python is widely used in many areas, from system administration to data science.
a system administration
System administrators need Python to automate tasks. It’s simple, powerful, and supports special packages that make it more efficient. And, most importantly, it is installed by default on all Linux servers.
Python’s conciseness makes it easy to read the code and find weaknesses. The format in a language is part of the syntax.
a scientific investigation
Python has several libraries that are useful for doing scientific research and computation:
SciPy – a library of scientific tools;
Numbly – an extension that adds support for arrays and multidimensional arrays, as well as mathematical functions for working with them;
Matplotlib is a library for working with 2D and 3D plots.
Because of the libraries and the ease of learning the language, many scientists choose Python – it is especially popular with mathematicians and physicists.
Data Science
Python is one of the most used languages in Data Science. It is used to write machine learning algorithms and analytical applications. It serves data warehouses, servers, and cloud services.
It also helps analyze internet data. For example, at Google, Python is used to index websites and various content.
Which companies are using the Python language?
Most often the python is used by startups and companies developing large projects. Here is just a part of the huge list:
The Alphabet uses the language to ditch Google and implement YouTube;
One Laptop Per Child – to develop the interface and operating model;
BitTorrent – to implement peer-to-peer networks;
US National Security Agency – for encryption and intelligence analysis;
ESRI – as a tool for configuring geographic information programs;
Maya – to create animation;
Pixar, Industrial Light & Magic – to create animated movies;
Intel, Cisco, HP, Seagate, Qualcomm and IBM for probes;
JPMorgan Chase, UBS, Genco and Citadel – for financial market forecasting;
NASA, Los Alamos, Fermi lab, JPL – for scientific computing and statistical analysis;
iRobot – for the development of commercial robotic devices;
IronPort – for the implementation of mail servers.
It is also used by Instagram, Positive Technologies, Houdini, Facebook, Yahoo, Red Hat, Dropbox, Pinterest, Quora, Mail.ru, and Yandex.
Python Disadvantages
Despite all the advantages, the language also has disadvantages. A Python program is considered to be quite slow. Swift iOS apps run 8x faster than Python apps. The PyPy implementation approaches the speed of Java, but does not have all the features of the original language. Python is not suitable for tasks that require calculations and processing of a large amount of data – they are best solved with modular inserts in C or C++.
Python’s heavy reliance on system libraries makes portability to other systems difficult. For these purposes, there is a Virtualenv tool, but it also has drawbacks: redundancy of complete isolation methods, crutches, duplication of system libraries.