Sistema de blogs Diarium
Universidad de Salamanca
Pablo Gallardo's Blog
My professional web log about IT, Cybersecurity & Project Management
 

Python

This post is an introduction to the programming language Python.

FAQs about Python

What is Python?

Python is an high-level, object-oriented, dynamically typed and interpreted programming language.

Its first version was released on 1991. It is owned by the Python Software Foundation (PSF).

It has a BSD-based license, meaning that it is free and open source, what attracts some developers and explain its popularity among some communities like Linux users.

You need to have a Python virtual machine installed in your computer in order to run a Python application. The Python interpreter is called CPython.

One main characteristic that makes Python different to others is that it is dynamically typed. Because you do not need to worry about the variable types, it is easier and it is common among beginners and casual programs.

Python is sometimes referred as a glue language, because it is often used to connect large software components.

One critique about Python is that it is not as mature as other established programming languages. On the other hands, there are multiple libraries available for Python.

Are there different versions of Python?

There has been different versions of Python.

Python 3 is the latest version and it is not backwards compatible.

Python 2 support ended on January 2020.

When you read about Python, most probably they are talking about Python 3.

Which Integrated Development Environment (IDE) is available for Python?

It is not mandatory to use an IDE to develop Python as there is a command-based tool. However, it may be more productive for most users to use a proper Integrated Development Environment (IDE).

Official Python IDE is Python IDLE.

PyCharm is a dedicated Python IDE that offers extended functionalities than Python IDLE.

There are Eclipse extensions for Python, as for example, PyDev. Check these posts about how to use Python on Eclipse on Windows and Ubuntu.

What are Python modules?

Python modules allow to add to your computer libraries, functionalities and tools already done, tested and provided by others. This enables reusability of code, and avoid having to develop your own tools and functionalities when someone else have already developed them and made them available.

Python modules can be imported to our computer using Package Installer for Python (PIP). Its command-line executable is ‘pip’.

Can Python be used to develop graphical user interfaces (GUI)?

There are different Python modules available that provide graphical user interfaces:

  • Free
    • tkinter (standard GUI)
    • wxPython (simpler but not simplest)
    • PySimpleGUI (simplest)
    • Kivy (for touch screens)
    • Libavg (for touch screens)
  • Commercial
    • PyQt5
    • PySide 2

Can Python be used to develop computer games?

There are some Python modules dedicated to games development:

  • Pygame
  • Pyglet
  • Arcade

For example, video game “Frets on fire” is developed using Pygame.

Can Python be used to use artificial intelligence (AI) and machine-learning (ML)?

There are specific modules to develop AI and ML apps. In fact, Python is a reference for people interested in working on those topics.

Does the user need to have Python installed on their computer? Isn’t that a drawback?

Python scripts need a Python interpreter (CPython) to be run. Nevertheless, there are ways to create standalone files from the Python script that can be run on specific OS without the need of an interpreter. So the answer is ‘no’, it is not mandatory to have Python installed on your computer to run one of its programs.

One of the advantages of interpreted language is that the same file can be run on any computer without modifications. A drawback is that you need to have installed a Python interpreter (CPython) on each computer where it is going to run.

Alternatively, you can create an standalone executable file that does not require to have CPython previously installed, but on the other hand it will work only in specific platforms and the file will lose its portability.

How do I create a standalone file for a specific OS?

There are different Python modules to create an executable file:

  • PyInstaller. Allows to create a Python standalone app for Windows, macOS and Linux. PyInstaller is available from PIP. You may need to install Microsoft Visual C++ Redistributable on Windows because of the use of shared libraries by the application. You can find more info about on this link.
  • py2app. Creates apps for macOS.
  • py2exe. Creates apps for Windows OS.

How do I start learning Python?

The official Python tutorial can be found on this link.

Other interesting online tutorials:

There are many other webs and books to teach you how to learn Python. Just search for it using your favourite search engine.

You might be also interested in…

External references

pmgallardo

About pmgallardo

I studied Computer Science at University of Salamanca. Since then, I have been working first as developer and then as SAP consutant. This blog is about problems I dealt when using computers, and more important, the solutions I found. Whenever I am on an issue and suddenlly I have a flash that leads me to a solution, I document my discoveries in a post.

, , , , , , , , , , , , , , , ,

No comments yet.

Leave a Reply


*

Política de privacidad
Studii Salmantini. Campus de excelencia internacional