Python programming language how to work. How to learn machine learning? Dynamic compilation and bytecode

Should I learn the Python programming language? After all, one can often hear that this language is dying. This issue was discussed by users of the Quora site and shared their opinions.

Bill Carwn, SQL Developer, Consultant, Trainer, and Author

Assembler language gives you a great opportunity to write compact, efficient and project-optimized code. You can do amazing things in code written in this language, which takes up only a few kilobytes. But the level of efficiency that can be obtained using the assembly language does not justify the extra work, extra time and the skills that it requires.

It is true that languages \u200b\u200bare both gaining popularity and losing it. Productivity is the main task in programming, so from time to time new languages \u200b\u200bare created that increase productivity, at least for some types of work.

Most programmers today use higher-level languages \u200b\u200b- they need to be more productive. Top-level languages \u200b\u200bcan be compiled into machine code (C or C ++), or they can be compiled into bytecode with an independent architecture and run in a virtual machine (Java), or they can be processed (JavaScript, PHP, Ruby, Python, Perl, etc.).

The erroneous opinion that it is necessary to learn assembly language, because "it is better than Python." This is a dumb point of view built on outdated data.

Bill Poucher, Executive Director of ICPC, software in the fields of energy, synthetic genetics, etc.

Learn Python. Provide yourself with programming experience. This language has its own elegance.

Learn C as a language for Unix machines. Understanding UNIX is relatively straightforward.

Learn MIX to understand Knuth.

Learn Java so that you don’t have difficulty working with others, and also master object-oriented programming.

Learn C ++ to program in any style you want. Its strength is that it is the main programming language. Its weakness is that for programming on it it is necessary to understand its style.

Learn LISP to reinforce your understanding of recursion.

Did I say that you should not learn at least something? Not. Because the only thing that needs to be done is to accustom yourself to the constant study of something, especially to the study of how you can solve problems.

Shiva Shinde, Python is easy to code, but hard to read

The Python programming language does not die, it is one of the fastest growing languages.

  1. Easy to learn
  • Currently, 8 out of the 10 best US computer programs use this language (Philip Guo, CACM)
  • Python programs typically have a minimum of patterns that are commonly found in other programming languages. Therefore, you can often use non-standard solutions to problems.
  • If you have programming experience, even if not in this language, then you will quickly master Python.

2. Full functionality

  • It is not only a language for statistics. Python has all the capabilities for collecting and cleaning data, for working with databases and high-performance computing, as well as many others.
  • This is a common programming language with a huge number of built-in libraries. It is good for managing data and databases, as well as for working with network programming. This is a well-thought-out language with a huge amount of resources available.

3. Serious libraries of scientific data

  • Python has significant scientific libraries with a wealth of data to use.
  • The basis of these scientific libraries is the SciPy Ecosystem, which even holds its own conferences.
  • Pandas and Matplotlib are the components of SciPy. They provide superior data on a wide variety of topics, such as machine learning, text mining, and network analysis.

Hernan Sulazh, pragmatic programmer

This language is quite popular, its importance is growing in the academic community. It is also true that the usefulness of a programming language depends on what you want to do on it.

I don't like PHP at all, but I'm not so stupid as to deny its versatility and power, and the fact that this language is easy enough to master.
  As for the study of assembler, this language directly depends on which processor you are working with.

If you know how to work with one, then you can definitely use it in the processor family for some time. But over time, and they undergo some changes. In this sense, it is the least durable family of languages.

Magnus Lychka, software developer and consultant in Gothenburg

Many users like Python. For some applications, it will be too slow, and, for example, they will work faster with assembly language, but they will also work quickly in C, while the code written in C will work for any platform.

Many startups became successful with the Python language, after which they had to rewrite some programs in Java, C ++ or C. And if these startups started working with the assembler language, then most likely their funding would end long before they were very fast but difficult to read code would be complete.

But, working with assembly language, you will have to face not only various processor architectures, but also technical details that differ in different operating systems.

Last update: 01.24.2018

Python is a popular high-level programming language that is designed to create various types of applications. These are web applications, and games, and desktop programs, and work with databases. A fairly widespread python has received in the field of machine learning and artificial intelligence research.

Python was first announced in 1991 by Dutch developer Guido Van Rossum. Since then, this language has come a long way. Version 2000 was published in 2000, and version 3.0 in 2008. Despite seemingly such large gaps between versions, subversions are constantly coming out. So, the current current version at the time of writing this material is 3.7. More detailed information about all releases, versions and language changes, as well as the interpreters themselves and the necessary utilities for work and other useful information can be found on the official website https://www.python.org/.

Key features of the Python programming language:

Python is a very simple programming language, it has a concise and at the same time quite simple and understandable syntax. Accordingly, it is easy to learn, and actually this is one of the reasons why it is one of the most popular programming languages \u200b\u200bspecifically for learning. In particular, in 2014 it was recognized as the most popular programming language for training in the United States.

Python is also popular not only in the field of training, but in writing specific programs, including commercial ones. To a large extent, therefore, many libraries have been written for this language that we can use.

In addition, this programming language has a very large community, on the Internet you can find a lot of useful materials, examples, and receive qualified help from specialists on this language.

To create Python programs, we need an interpreter. To install it, we’ll go to the website https://www.python.org/ and on the main page in the Downloads section we will find a link to download the latest version of the language (currently it is 3.7.2):

Follow the link to the page with the description of the latest version of the language. Closer to the bottom on it you can find a list of distributions for different operating systems. Choose the package we need and download it. For example, in my case, this is Windows 64-bit, so I select the package link Windows x86-64 executable installer. After downloading the distribution, install it.

Accordingly, for MacOS, you can select macOS 64-bit installer.

On Windows, when the installer starts, it launches the installation wizard window:

Here we can set the path along which the interpreter will be installed. Leave it as default, i.e. C: \\ Users \\ [username] \\ AppData \\ Local \\ Programs \\ Python \\ Python36 \\.

In addition, at the very bottom, check the box "Add Python 3.6 to PATH" to add the path to the interpreter in environment variables.

After installation in the Start menu on Windows, we can find icons for accessing various python utilities:

Here the Python 3.7 utility (64-bit) represents an interpreter in which we can run the script. In the file system, the interpreter file itself can be found along the path along which the installation was performed. On Windows, this is the default path. C: \\ Users \\ [username] \\ AppData \\ Local \\ Programs \\ Python \\ Python37, and the interpreter itself represents the python.exe file. On Linux, the installation is done along the path /usr/local/bin/python3.7.

Being a well-designed programming language, Python is perfect for solving real-world problems from the category of those that developers have to solve every day. It is used in a wide range of applications - both as a tool for managing other software components and for implementing stand-alone programs. In fact, the range of roles that Python can play as a multi-purpose programming language is practically unlimited: it can be used to implement

anything from websites and game programs to controlling robots and spaceships.

However, the scope of Python can now be divided into several broad categories. The next few sections describe the most common uses of Python these days, as well as the tools used in each area. We will not have the opportunity to research the tools mentioned here. If any of them interest you, check out the Python project website for more

System Programming

Python’s built-in interfaces for accessing operating system services make it an ideal tool for creating portable programs and system administration utilities (sometimes called shell tools). Python programs can search for files and directories, run other programs, perform parallel calculations using several processes and threads, and do

much more.

The Python standard library fully complies with POSIX standards and supports all typical operating system tools: environment variables, files, sockets, pipes, processes, a multi-threaded execution model, pattern matching using regular expressions, command line arguments, standard data stream access interfaces, running shell commands, adding file names, and more

In addition, Python system interfaces are portable, for example, copying a directory tree does not require changes, no matter what operating system it is used in. The Stackless Python system used by EVE Online also offers advanced solutions for parallel data processing.

GUI

Python's simplicity and high development speed make it a great GUI tool. Python includes a standard object-oriented interface to the Tk GUI API called tkinter (in Python 2.6 it is called Tkinter) t that allows Python programs to implement a portable graphical interface with the appearance inherent in the operating system. Python based GUIs /

tkinter can be used without changes in MS Windows, X Window (on one-way UNIX and Linux systems) and Mac OS (both in the classic version and in OS X). The free PMW extension package contains additional visual components for the tkinter suite. In addition, there is a wxPython GUI API based on the C ++ library, which offers an alternative set of tools for building portable graphical interfaces in Python.

High-level tools like PythonCard and Dabot are built around APIs like wxPython and tkinter. When choosing the appropriate library, you can also use other GUI creation tools such as Qt (using PyQt), GTK (using PyGtk), MFC (using PyWin32), .NET (using IronPython), Swing (using Jython - An implementation of the Python language in Java, which is described in Chapter 2, or JPype). You can use Jython, Python web frameworks, and CGI scripts, which are described in the next section, and provide additional options for creating a user interface to develop applications with a web interface or without high interface requirements.

Web scripting

The Python interpreter comes with standard Internet modules that allow programs to perform a variety of network operations in both client mode and server mode. Scripts can interact through sockets, extract information from forms submitted to server-side CGI scripts; transfer files via FTP; process XML files; transmit, receive, create and parse

emails Download web pages from specified URLs parse HTML and XML markup of received web pages; make XML-RPC, SOAP, and Telnet interactions, and more.

The libraries that make up Python make implementing such tasks surprisingly easy.

In addition, there is a huge collection of third-party tools for creating Python networking programs that can be found on the Internet. For example, the HTMLGen system allows you to create HTML pages based on Python class descriptions. The mod_python package is designed to run Python scripts running on the Apache web server and supports the Python Server Pages engine templates. Jython system provides

seamless Python / Java integration and supports server-side applets that run on the client side.

In addition, there are full-fledged web development packages for Python, such as Django, TurboGears, web2py, Pylons, Zope, and WebWare, which support the ability to quickly create full-featured, high-quality websites in Python. Many of these include features such as object-relational mappings, Model / View / Controller architecture, server-side scripting, template support, and AJAX technology, providing

complete and reliable web application development solutions.

Component Integration

The possibility of integrating software components into a single application using Python was already discussed above when we talked about Python as a control language. Python's ability to expand and integrate into

c and C ++ systems makes it a convenient and flexible language for describing the behavior of other systems and components. For example, integration with a C language library allows Python to check for and run library components, and embedding Python in software products allows you to configure software products without having to rebuild these products or supply them with the source code.

Tools such as Swing and SIP, which automatically generate program code, can automate the actions of linking compiled components in Python for later use in scripts, and the Cython system allows programmers to mix program code in Python and C. Huge Python platforms such as support COM

on MS Windows, Jython is a Java implementation, IronPython is a .NET implementation and various CORBA implementations provide alternative ways of organizing interactions with software components. For example, in the Windows operating system, Python scripts can use control platforms for applications such as MS Word and Excel.

Database applications

Python has interfaces for accessing all major relational databases — Sybase, Oracle, Informix, ODBC, MySQL, PostgreSQL, SQLite, and more. In the Python world, there is also a portable database application programming interface for accessing SQL databases from Python scripts that unifies access to various databases. For example, when using a portable API, a script designed to work with a free MySQL database will be able to work with other database systems (such as Oracle) almost without changes. All that is required to do this is to replace the low-level interface used.

The standard pickle module implements a simple object storage system, which allows programs to save and restore Python objects in files or in specialized objects. On the Web, you can also find a system created by third-party developers called ZODB.

It is a fully object oriented database.

for use in Python scripts. There are also

tools like SQLObject and SQLAlchemy that display

relational tables in the Python class model. Starting with Python 2.5,

the standard part of Python is the SQLite database.

Rapid prototyping

In Python programs, components written in Python and C look the same. Thanks to this, you can first create prototypes of systems in the Python language, and then transfer the selected components to compiling languages, such as C and C ++. Unlike some other prototype development tools, Python does not require the system to be completely rewritten as soon as the prototype is debugged. Parts of the system that do not require as much performance as C ++ provides can

leave in Python, which will greatly simplify the maintenance and use of such a system.

Math programming

and scientific computing

The NumPy extension for mathematical calculations, mentioned above, includes such powerful elements as array objects, interfaces to standard mathematical libraries, and much more. The NumPy extension — by integrating with math libraries written in compiling programming languages \u200b\u200b— turns Python into a sophisticated yet convenient math computing programming tool that can often replace existing program code written in traditional compiling languages \u200b\u200bsuch as FORTRAN and C ++.

Additional mathematical tools for Python support the ability to create animated effects and three-dimensional objects, allow you to organize parallel calculations, and so on. For example, the popular SciPy and ScientificPython extensions provide additional libraries for scientific computing and take advantage of the NumPy extension capabilities.

Games, Images, Artificial Intelligence,

XML robots and more

The Python programming language can be used to solve a wider range of tasks than can be mentioned here. For example:

Create game programs and animations using

pygame systems

Communicate with other computers through serial

port using PySerial extension

Process images with PIL extensions, PyOpenGL,

Blender, Maya and others

Control the robot with the PyRo tool

Parse XML documents using the xml package, xmlrp module

clib and third party extensions

Program artificial intelligence using a neuro-emulator

networks and shells of expert systems

Analyze natural language phrases using the NLTK package.

You can even decompose solitaire using PySol. Support for many other application areas can be found on the PyPI website or through search engines (look for links using Google or at http://www.python.org).

Generally speaking, many of these uses of Python are just a variation of the same role called component integration. Using Python as an interface to libraries of components written in C makes it possible to create scripts in Python to solve problems in various application areas. As a versatile, multi-purpose programming language that supports integration, Python  can be applied very widely.

By the way, do you have problems with the laptop power supply? We advise you to buy laptop power supplies at very affordable prices. On the website of the company darrom.com.ua you will find power supplies for any laptop.

Python  - A powerful and easy to learn programming language. It provides convenient high-level data structures and a simple but effective approach to object-oriented programming. Python  interpreted language. To run written programs, you need a CPython interpreter. The python interpreter and the large standard library are freely available in the form of source and binary files for all major platforms on the official website Python  http://www.python.org and may be distributed without restriction. In addition, the site contains distributions and links to numerous third-party modules and detailed documentation.
  The language has a clear and consistent syntax, well-thought-out modularity and scalability, so the source code written in Python  programs are easy to read. Language developers Python  adhere to a certain programming philosophy called “The Zen of Python”. Its text is issued by the interpreter using the import this command:

   \u003e\u003e\u003e import this The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren "t special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one - -obvious way to do it. Although that way may not be obvious at first unless you "re Dutch. Now is better than never. Although never is often better than * right * now. If the implementation is hard to explain, it "s a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea - let" s do more of those!

In translation, it sounds like this:

  •   Beautiful is better than ugly.
  •   Explicit is better than implicit.
  •   Simple is better than complex.
  •   Complex is better than intricate.
  •   Flat is better than nested.
  •   Sparse is better than dense.
  •   Readability matters.
  •   Special cases are not so special as to break the rules.
  •   At the same time, practicality is more important than impeccability.
  •   Mistakes should never be hushed up.
  •   If not hushed up explicitly.
  • When faced with ambiguity, discard the temptation to guess.
  •   There must be one - and preferably only one - obvious way to do this.
  •   Although at first it may not be obvious if you are not Dutch.
  •   Better now than never.
  •   Although never often better than right now.
  •   If the implementation is difficult to explain, the idea is bad.
  •   If the implementation is easy to explain, the idea is probably a good one.
  •   Namespaces are a great thing! We will make them bigger!

Python  - An actively developing programming language, new versions are released approximately every two and a half years. Due to this and some other reasons on Python  There are no ANSI, ISO, or other official standards; CPython plays their role.

History of the language

The development of the Python language was started in the late 1980s by an employee of the Dutch CWI Institute. The distributed Amoeba OS required an extensible scripting language for which Guido van Rossum created Python. The new language borrowed some of the best practices for the ABC language, which was focused on teaching programming. In February 1991, Guido published the source text in the newsgroup alt.sources. The name of the language did not come from the species of reptiles. The author named the language after the popular British comedy television show of the 1970s, Monty Python's Flying Circus. Nevertheless, the emblem of the tongue is represented by snake heads. After extensive testing, the first version of Python 3.0 was released. Both branches of development are supported today (Python 3.x and 2.x).

Python was created under the influence of many programming languages: Modula-3, C, C ++, Smalltalk, Lisp, Fortran, Java, Miranda, Icon. Despite the fact that Python has a fairly distinctive syntax, one of the design principles of this language is the principle of least surprise.

Standard library

The rich standard library is one of Python's attractive points. There are tools for working with many network protocols and Internet formats. There are modules for working with regular expressions, text encodings, multimedia formats, cryptographic protocols, archives. In addition to the standard library, there are many libraries that provide an interface to all system calls on different platforms.
  For Python, a specification of the program interface to DB-API 2 databases was adopted and packages corresponding to this specification were developed for access to various DBMSs: Oracle, MySQL, PostgreSQL, Sybase, Firebird (Interbase), Informix, Microsoft SQL Server and SQLite.
The NumPy library for working with multidimensional arrays allows you to achieve the performance of scientific calculations, comparable to specialized packages. SciPy uses NumPy and provides access to a wide range of mathematical algorithms. Numarray is specially designed for operations with large volumes of scientific data.
  Python provides a simple and convenient C API for writing custom modules in C and C ++. A tool like SWIG allows you to get bindings almost automatically for using C / C ++ libraries in Python code. The ctypes standard library tool allows Python programs to directly access dynamic C libraries. There are modules that allow you to embed C / C ++ code directly into Python source files, creating extensions on the fly.
  Python and the vast majority of libraries to it are free and are delivered in source codes. Moreover, unlike many open systems, the license does not limit the use of Python in commercial developments and does not impose any obligations other than copyright.

Fields of application

Python is a stable and common language. It is used in many projects and in various qualities: as the main programming language or for creating extensions and application integration. Python has implemented a large number of projects, and it is also actively used to prototype future programs. Python is used by many large companies.
  Python with the packages NumPy, SciPy and MatPlotLib is actively used as a universal environment for scientific calculations as a replacement for the popular specialized commercial packages Matlab, IDL, etc.
  In professional 3D graphics programs such as Houdini and Nuke, Python is used to extend the standard features of programs.

Sources

Presentations

Homework

Prepare Messages:

  •   Python as a tool for scientists
  •   Python and Ruby (comparison)
  •   Python and WEB
  •   Creating windowed applications using Python and graphic libraries (wxPython, PyQt, PyGTK, etc.)

Let's move on to the theoretical and practical part and start with what the interpreter is.

Interpreter

Interpreter - This is a program that runs other programs. When you write a program in Python, the interpreter reads your program and executes the instructions contained in it. In reality, an interpreter is a layer of program logic between your program code and the hardware of your computer.

Depending on the version of Python used, the interpreter itself can be implemented as a program in C, as a set of Java classes and in some other form, but more on that later.

Running a script in the console

Let's run the interpreter in the console:

Now it is waiting for commands to be entered, enter the following instruction there:

Print "hello world!"

cheers, our first program! : D

Running a script from a file

Create the file "test.py", with the contents:

   # print "hello world" print "hello world" # print 2 to the power of 10 print 2 ** 10

and execute this file:

   # python /path/to/test.py

Dynamic compilation and bytecode

After you run the script, it first compiles the source code of the script into bytecode for the virtual machine. Compilation  - this is just a translation step, and bytecode is a low-level platform-independent representation of the source code of the program. Python translates each instruction in the source code of the script into groups of bytecode instructions to increase the speed of program execution, since bytecode runs much faster. After compilation into bytecode, a file is created with the extension ".pyc"  next to the script source.

The next time you run your program, the interpreter will bypass the compilation stage and give the compiled file with the extension ".pyc" for execution. However, if you change the source code of your program, then the compilation step into bytecode will happen again, since Python automatically keeps track of the date the source file was changed.

If Python is unable to write a file with bytecode, for example, due to a lack of write permissions to disk, then the program will not suffer, just the bytecode will be collected in memory and deleted from the program at the end of the program.

Python Virtual Machine (PVM)

After the compilation process has passed, the bytecode is passed to a mechanism called virtual machine, which will execute the instructions from the bytecode. Virtual machine  - This is a runtime mechanism, it is always present in the composition of the Python system and it is an extreme component of the system called the Python Interpreter.

To consolidate this, we’ll clarify the situation once again, compilation into bytecode is done automatically, and PVM is just part of the Python system that you installed with the interpreter and compiler. Everything happens transparently for the programmer, and you do not need to perform these operations manually.

Performance

Programmers with experience with languages \u200b\u200bsuch as C and C ++ may notice some differences in the Python runtime model. The first is the lack of a build phase or calling the "make" utility; Python programs can be run immediately after writing the source code. The second difference is that the bytecode is not binary machine code (for example, instructions for the Intel microprocessor), it is an internal representation of a Python program.

For these reasons, Python programs cannot run as fast as C / C ++. The instructions are crawled by the virtual system, not the microprocessor, and to execute the bytecode, additional interpretation is needed, the instructions of which require more time than the microprocessor machine instructions.

However, on the other hand, unlike traditional interpreters, such as in PHP, there is an additional compilation stage here - the interpreter does not need to analyze the source code of the program each time.

As a result, Python is in performance between traditional compiling and traditional interpretive programming languages.

Alternative Python implementations

What was said above about the compiler and the virtual machine is characteristic of the standard Python implementation, the so-called CPython (ANSI C implementation). However, there are also alternative implementations, such as Jython and IronPython, which will be discussed now.

This is the standard and original implementation of Python, so named because it is written in ANSI C. It was we who installed it when we selected the package ActivePython  or installed from Freebsd  ports. Since this is a reference implementation, it is usually faster, more stable and betterthan alternative implementations.

Jython

Originally named JPython, the main goal is tight integration with the Java programming language. The Jython implementation consists of Java classes that compile Python code into Java bytecode and then pass the resulting bytecode java Virtual Machine (JVM).

Jython's goal is to enable Python programs to control Java applications, just like CPython can manage C / C ++ components. This implementation has seamless integration with Java. Because Python program code translates into Java bytecode, it behaves exactly like a real Java program at runtime. Jython programs can act as applets and servlets, create a graphical interface using Java mechanisms, etc. Moreover, Jython provides support for the ability to import and use Java classes in Python code.

However, since the Jython implementation provides lower execution speed and is less stable than CPython, it is of interest to Java developers who need a scripting language as an interface to Java code.

The implementation is designed to ensure the integration of Python programs with applications created for use in the Microsoft .NET Framework Windows operating system, as well as in Mono, the open equivalent for Linux. The .NET platform and the C # runtime are designed to provide interoperability between software objects - regardless of the programming language used, in the spirit of Microsoft's earlier COM model.

IronPython allows Python programs to play the role of both client and server components available from other .NET programming languages. Insofar as development by MicrosoftIronPython, among other things, could expect significant performance optimization.

Performance Optimization Tools

There are other implementations, including a dynamic compiler Psyco  and the Shedskin C ++ translator, which are trying to optimize the underlying execution model.

Psyco Dynamic Compiler

Psyco system  is a component that extends the bytecode execution model, which allows programs to run faster. Psyco  is an extension PVM, which collects and uses type information to translate portions of the bytecode of the program into true binary machine code, which runs much faster. Such a translation does not require changes to the source code or additional compilation during development.

At run time, Psyco collects information about the types of objects, and then this information is used to generate highly efficient machine code optimized for objects of this type. After that, the generated machine code replaces the corresponding sections of the bytecode, thereby increasing the speed of execution.

Ideally, some pieces of code under the control of Psyco can run as fast as compiled C code.

Psyco provides an increase in speed from 2 to 100 times, but usually 4 times, using an unmodified Python interpreter. The only drawback with Psyco is the fact that it is currently able to generate machine code only for architecture Intel x86.

Psyco does not come as standard, it must be downloaded and installed separately. Still have a project Pypywhich is an attempt to rewrite PVM  in order to optimize the code as in Psycoproject Pypy  going to absorb more of the project Psyco.

Shedskin C ++ Translator

Shedskin  is a system that converts Python source code into C ++ source code, which can then be compiled into machine code. In addition, the system implements a platform-independent approach to the execution of Python code.

Fixed binaries

Sometimes you need to create independent executable files from your Python programs. Rather, it is necessary for packaging and distribution of programs.

Fixed binary files combine the bytecode of the programs, PVM, and support files needed by the programs into a single package file. The result is a single executable file, for example, a file with the extension ".exe" for Windows.

Today, there are three main tools for creating frozen binaries:

  • py2exe  - he can create stand-alone programs for Windows, using the Tkinter, PMW, wxPython and PyGTK libraries to create a graphical interface, programs that use the software for creating games PyGame, client programs win32com and many others;
  • PyInstaller  - reminds py2exe, but also works on Linux and UNIX and is capable of producing self-installing executable files;
  • freeze  - original version.

You need to download these tools separately from Python, they are distributed free of charge.

Fixed binary files have a considerable size, because they contain PVM, but by modern standards, they cannot be called unusually large. Since the Python interpreter is embedded directly in fixed binary files, installing it is not a requirement for running programs on the receiving side.

Summary

That's it for today, in the next article I’ll talk about standard data types in Python, and in the next articles we’ll look at each type individually, as well as functions and operators for working with these types.

Do you like the article? Share with friends: