Working with Python in Pisi Linux ( with example install ReText)

Python is a widely used high-level, general-purpose, interpreted, dynamic programming language. Its design philosophy emphasizes code readability, and its syntax allows programmers to express concepts in fewer lines of code than would be possible in languages such as C++ or Java. The language provides constructs intended to enable clear programs on both a small and large scale.

Python supports multiple programming paradigms, including object-oriented, imperative and functional programming or procedural styles. It features a dynamic type system and automatic memory management and has a large and comprehensive standard library.

Python interpreters are available for installation on many operating systems, allowing Python code execution on a wide variety of systems. Using third-partytools, such as Py2exe or Pyinstaller, Python code can be packaged into stand-alone executable programs for some of the most popular operating systems, allowing the distribution of Python-based software for use on those environments without requiring the installation of a Python interpreter.

CPython, the reference implementation of Python, is free and open-source software and has a community-based development model, as do nearly all of its alternative implementations. CPython is managed by the non-profit Python Software Foundation.

For more reading about Python look at this Wikipedia page or on the Python Website

 

A simple example to work with Python in Pisi Linux

We will install in Pisi Linux ReText, ReText is a simple but powerful editor for Markdown and reStructuredText markup languages. ReText is written in Python language and works on Linux and other POSIX-compatible platforms.

For the work with ReText,  it requires the following Dependencies to run.

  • python3
  • python-qt5
  • python-markups
  • python-markdown — for Markdown language support
  • python-docutils — for reStructuredText language support
  • python-enchant — for spell checking support

In Pisi Linux 2.0 you can install the following Dependencies:

 sudo pisi it python3 python-qt5 python3-qt5 python3-setuptools python-setuptools python-MarkupSafe docutils  

Note: In Pisi Linux you have for any packages other names, such as here instead python-docutils only the name docutils.

The packages python-markdown and python-enchant are not at the Moment in the Pisi Linux 2.0 Repo but it comes.

For this install now pip in Pisi Linux

pip is The PyPA recommended tool for installing Python packages.

Also type:

 sudo pisi it pip pip3  

After this can you go on work and install the missing python-packages with the command:

 sudo python3 -m pip install pyenchant  

 

after it type:

 sudo python3 -m pip install Markdown  

So now have you all Dependencies for the  ReText package, ReText is at the moment not available for Pisi Linux 2.0 so you can install it simple with the command

 sudo python3 -m pip install ReText  

 

it download ReText directly from the Python page.

if you have install it and you will upgrade any Python packages while in the Pisi Linux is not the newest version from it type simple:

 sudo python3 -m pip install --upgrade PackageName  

Note: Replace the word PackageName for the package what you will upgrade.

So after it you have a working ReText-editor for your working.

 

retext

 

About the working with pip can you read here much more:

https://pip.pypa.io/en/latest/

About the woking with ReText read here much more:

https://github.com/retext-project/retext/wiki