Python programming - compiler and interpreter

Author: Insist--

Personal homepage: insist--personal homepage

This article column: python column

Column introduction: This column is a free column, and will continue to update the basic knowledge of python. Welcome to subscribe and pay attention.

Table of contents

1. Introduction to Compilers and Interpreters

2. The difference between compiler and interpreter

3. Types of python compilers and interpreters

1、Briton

2、winPython

3、Pyjs

Four. Summary


foreword

Through the introduction to python in the previous article, how much do you know about python? Today's article will explain compilers and interpreters to you.a3666f5198774acfa8021721ce0e2145.png

1. Introduction to Compilers and Interpreters

Both the python compiler and the interpreter are translators between high-level languages ​​and machines .

Function: The function of both isto translate the code into binary machine code that the machine can execute. The difference between the two is thatthe operating principle and translation processare different.

2. The difference between compiler and interpreter

Compiler: After programming as a whole, execute it.

Interpreter: Execute while explaining.

In layman's terms: we went to a restaurant to eat and ordered a bunch of dishes.

The way of the compiler is that after the chef prepares all the dishes, he will serve them to you one by one. As for where you eat, whether you eat on your stomach or upside down, it doesn’t matter to you.

The way of the explainer is that the chef will serve you a dish when he prepares a dish, and you have to eat this dish, and you must finish it in the store.

5efb5abb74b24830aff5200cbb00ea1b.png

3. Types of python compilers and interpreters

1、Briton

Brython is a popular Python compiler that converts Python to Javascript code . It provides support for all web browsers, including a mobile web browser. It also supports the Html5/CSS3 specification and can use popular CSS frameworks such as BootStrap3 and LESS .

974f986fbcbc4b519829ce7e52c550b9.jpg

2、winPython

It is designed for Windows operating system . It has some CPython features. It comes pre-installed with some popular libraries for data science and machine learning, such as Numpy, Pandas, and Scipy . It comes with a C/C++ compiler, which is not used most of the time. Other than that, it only has the Python compiler and no other packages.

ce290a7a7aa943e584bba2dcf8399fb0.jpg

3、Pyjs

Pyjs is a rich Internet application framework and a lightweight Python compiler that can directly execute Python scripts from a web browser and execute programs from the browser's JS console . It's a Python-to-Javascript compiler that makes code run on web browsers. It comes with Ajax framework and Widget SetAPI.

eb73fbca90374ea4a169788f50ed7047.jpg

Four. Summary

Python is a development language that offers many implementation possibilities , such as Python to Java, Python to Javascript, and these compilers for Python help us understand how versatile it is.

Welcome to follow and subscribe, this column will support updates

 

 

おすすめ

転載: blog.csdn.net/m0_73995538/article/details/131019736