Social Icons

Saturday, December 2, 2017

Introduction to the Python language

1 - About Python language

Python is a high level, structured and open source scripting language. It is multi-paradigm and multi-purpose.

Originally developed by Guido van Rossum in 1989, it is, like most open source applications and tools, maintained by a team of developers around the world.

Designed to be object-oriented, it has no less tools to engage in functional or imperative programming; it is also one of the reasons that earned him its name of "agile language".

Other reasons include the speed of development (quality of interpreted languages), the large number of modules provided in the base distribution, and the number of interfaces available with libraries written in C, C ++ or Fortran. It is also appreciated for the clarity of its syntax, which opposes it to the Perl language.
The Python language is under a free license close to the BSD license and works on most computer platforms, from supercomputers to mainframes, from Windows to Unix including GNU / Linux via macOS, or Android, iOS , and also with Java or .NET. It is designed to optimize programmers' productivity by providing high-level tools and easy-to-use syntax.

It is also appreciated by some teachers who find a language where the syntax, clearly separated from the low-level mechanisms, allows an easy introduction to the basic concepts of programming.

2  - Python language features

Let's detail some of the main features of Python, more specifically, the language and its two current implementations:
  • Python is portable, not only on the different variants of Unix, but also on proprietary OS: MacOS, BeOS, NeXTStep, MS-DOS and different Windows variants. A new compiler, called JPython, is written in Java and generates Java bytecode.
  •  Python is free, but it can be used without restriction in commercial projects.
  • Python is suitable for scripts of about ten lines as well as complex projects of tens of thousands of lines.
  • The syntax of Python is very simple and, combined with advanced data types (lists, dictionaries, ...), leads to programs that are both very compact and very readable. Equal features, a Python program (extensively commented and presented according to the standard canons) is often 3 to 5 times shorter than a program C or C ++ (or even Java) equivalent, which generally represents a development time of 5 to 10 times shorter and a greatly increased ease of maintenance.
  • Python manages its resources (memory, file descriptors ...) without the intervention of the programmer, by a mechanism of counting of references (close, but different, of a garbage collector).
  • There are no explicit pointers in Python.
  • Python is (optionally) multi-threaded.
  • Python is object-oriented. It supports multiple inheritance and operator overload. In its object model, and using the terminology of C ++, all the methods are virtual.
  • Python integrates, like Java or the recent versions of C ++, a system of exceptions, which makes it possible to simplify the management of the errors considerably.
  • Python is dynamic (the interpreter can evaluate strings representing expressions or Python instructions), orthogonal (a small number of concepts is sufficient to generate very rich constructions), reflective (it supports metaprogramming, for example the capacity for an object to add or remove attributes or methods, or even to change class running) and introspective (a large number of development tools, such as the debugger or the profiler, are implemented in Python himself).
  • Like Scheme or SmallTalk, Python is dynamically typed. Any object that can be manipulated by the programmer has a well-defined type at runtime, which does not need to be declared in advance.
  • Python currently has two implementations. One, interpreted, in which the Python programs are compiled in portable instructions, then executed by a virtual machine (as for Java, with one important difference: Java being statically typed, it is much easier to speed up the execution of 'a Java program than a Python program). The other generates Java bytecode directly.
  • Python is extensible: like Tcl or Guile, it can be easily interfaced with existing C libraries. It can also be used as an extension language for complex software systems.
  • The standard Python library, and the contributed packages, give access to a wide variety of services: strings and regular expressions, standard UNIX services (files, pipes, signals, sockets, threads ...), Internet protocols (Web, News, FTP, CGI, HTML ...), persistence and databases, graphical interfaces.
  • Python is a language that continues to evolve, supported by a community of enthusiastic and responsible users, most of whom are supporters of free software. Parallel to the main interpreter, written in C and maintained by the creator of the language, a second interpreter, written in Java, is under development. 
  • Finally, Python is a language of choice for processing XML.

3 - Graphical Interfaces

Python has several modules available for creating software with a graphical interface. The most common is Tkinter. This module is suitable for many applications and can be considered sufficient in most cases. However, other modules have been created to be able to bind Python to other software libraries ("toolkit"), for more features, for better integration with the operating system used, or simply to be able to use Python with it. favorite library. Indeed, some programmers find the use of Tkinter more painful than other libraries. These other modules are not part of the standard library and must therefore be obtained separately.

The main modules giving access to GUI libraries are Tkinter and Pmw (Python megawidgets) 43 for Tk, wxPython for wxWidgets, PyGTK for GTK +, PyQt and PySide for Qt, and finally FxPy for the FOX Toolkit. There is also an adaptation of the SDL library: Pygame, a binding of SFML: PySFML, as well as a library written specifically for Python: Pyglet (en).

It is also possible to create Silverlight applications in Python on the IronPython platform.

4 - Use of the python language

As mentioned above, Python lends itself to a lot of tasks. The basic distribution allows, among other things, network developments, the creation of graphical interfaces (via tcl / tk), cgi programming, XML processing, etc ... Its relative ease of interfacing with written libraries in other languages ​​it is a tool of choice for scientific computing applications. It is also increasingly used as a prototyping language.

Python is also notable for the number of libraries accessible through the installation of the appropriate modules. Be it the connection with a database, the use of GUI libraries (wxPython, PyQt, pyGTK), the advanced XML manipulation (pyXML), the image processing (Python Imaging Library), the development video game (pygame), OpenGL, the vast majority of current technologies has its python extension

5 - Language implementations

In addition to the reference version, named CPython (because written in C language), there are other systems implementing the Python language:
  • Stackless Python, a version of CPython that does not use the C language call stack;
  • Jython, a Python interpreter for Java virtual machine. It has access to the libraries provided with the Java development environment;
  • IronPython, an interpreter / compiler (experimental) for .Net / Mono platform;
  • Brython, a Python implementation for web browsers.
  • PyPy a Python interpreter written in a subset of Python compilable to C or LLVM;
  • Shed Skin, a compiler of a subset of Python producing C ++ code;
  • Unladen Swallow, a version of CPython optimized and based on LLVM, now discontinued.
These other versions do not necessarily benefit from the entire library of functions written in C for the reference version, nor the latest developments in the language.

Younes Derfoufi

No comments:

Post a Comment

Category Of Mobile Courses

Actualités (644) Adsense (1) Affiliation (1) Algebraic Topology (2) Algorithmic (1) all-news (30) Android (5) Android App (8) Android app without code (4) Android Apps (241) Android Development (4) Android download (2) Android OS (3) AngularJS (1) Automata theory and formal language (5) C programming (5) Category and Functor (8) CMS (3) Computer Glossary (18) Create Mobile App With Ionic Framework (2) CSS (2) CSS-Cascading-Style-Sheets (4) Developpement Java (13) Differential Geometry (1) Django-Python-Framework (8) dropshiping (26) Earn Money by Internet (4) Emplois (23) Framework php (2) Fraud (2) HTML (7) Java For Beginners (10) Javascript (12) Kotlin Programming Language (8) Kotlin For Mobile Android (1) Linux Download (2) Marketing (5) Mobile (3) Mobile Courses (4) Mobile Marketing (4) MoneyGram (1) News (721) Node.js (5) Open Source (1) Photoshop (1) Protect Computer (1) Python (35) Python BeautifulSoup (1) Python For Data Science (2) Python-Books (6) Python-DVD-Training (1) Python-Exercises (207) Python-Framework (1) Python-IDE (1) Python-Modules (1) Python-pdf (2) Python-pyQt (1) Référencement (2) Script PHP (2) Security (6) SEO (1) Snipping Tool: Faq (1) Social Networks (1) Source Code (1) Statistics With SPSS (2) Surveillance Software (1) Travail à domicile (6) Tutoriels php en vidéos (2) Tutoriels-MySql (6) tutoriels-php (19) Utilitaires (1) VPS (1) Web Hosting (1) Webcam (1) Webmarketing (11) Western Union (1) Windows 10 (1) Windows 7 (4) Windows 7 Faq (2) Windows 8 (1) Windows Accessories (1) Windows Download (8) Windows Drivers (1) Windows Fonts (1) Windows Power Shell (2) Windows Registry (2) Windows Security (18) Windows Software (2) Windows Spyware (2) Windows utilities (3) Windows Virus (2) Windows Vista (3) Windows Wireless (1) Windows xp (1) Wordpress (1)

Sample text

Sample Text

Blogger Templates