Tag Archives: python

SymPy python module with Python 3.4.1 .

SymPy is a Python library for symbolic mathematics.
This module is a computer algebra system (CAS) written in the Python programming language.
A large can be found on this blog aggregator at planet.sympy.org.
First, You need to install it using pip3.4.

For a short introduction into SymPy python module I will show you the printing features.
The most common printers available in SymPy are:

  • str
  • repr
  • ASCII pretty printer
  • Unicode pretty printer
  • LaTeX
  • MathML
  • Dot

Let’s test it this first example:

How to print one matrix :

Next example come with this issue: equations can be solved with SymPy python module.

Posted in All, Python. Tagged with , , , , .

Pillow python module with Python 3.4.1 .

Pillow python module is the python PIL fork created by Alex Clark and Contributors.
As you know the PIL python module is the Python Imaging Library by Fredrik Lundh and Contributors.
I used Python 3.4 version with pip to install and upgrade the Pillow 2.8.1 python module.
The Pillow module version >= 2.0.0 supports Python versions 2.6, 2.7, 3.2, 3.3, 3.4 and no longer supports “import _imaging”. Please use “from PIL.Image import core as _imaging” instead.
Pillow and PIL cannot co-exist in the same environment and you nned to uninstall PIL and after install the Pillow python module.

Now you need to use PIL insead the Pillow. Let see:

Posted in All, Python, Windows 10. Tagged with , , , , .

The haralyzer python module.

The HAR file is an open file format for archiving HTTP packets.
You can find a lot of tools available to analyse, visualize HAR files.
Today I will show you how to use haralyzer python module to show infos about your website.
This python module contains two classes for analyzing web pages based on a HAR file.
I install this python module using pip3.4 under Python 3.4.1 version.

I used one online free tool to create a test.har file.
I put this file under Python3.4 folder and I test it.
The script I used is this:

And this is the output of this script :

Posted in All, Programming, Python. Tagged with , , , , , .

Two python modules : MoviePy and images2gif – part 001 .

MoviePy is a Python module for video editing, which can be used for basic operations (like cuts, concatenations, title insertions), video compositing (a.k.a. non-linear editing), video processing, or to create advanced effects. It can read and write the most common video formats, including GIF.
Read about this module here .
… this module let you to working with GIF image files.
Read abouth this python module here .

I used the python 3.4 version with pip3.4.
Test the pip3.4 with :
C:\Python34\Scripts>pip3.4.exe install --upgrade pip
Requirement already up-to-date: pip in c:\python34\lib\site-packages

Then install the python modules with :
C:\>cd Python34
C:\Python34>cd Scripts
C:\Python34\Scripts>pip3.4.exe install MoviePy
You are using pip version 7.0.1, however version 7.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting MoviePy
Downloading moviepy- (107kB)
100% |################################| 110kB 1.2MB/s
Requirement already satisfied (use --upgrade to upgrade): numpy in c:\python34\l
ib\site-packages (from MoviePy)
Requirement already satisfied (use --upgrade to upgrade): decorator in c:\python
34\lib\site-packages (from MoviePy)
Collecting imageio (from MoviePy)
Downloading imageio-1.2.tar.gz (120kB)
100% |################################| 122kB 1.3MB/s
Collecting tqdm (from MoviePy)
Downloading tqdm-1.0.tar.gz
Building wheels for collected packages: MoviePy, imageio, tqdm

and …

C:\Python34\Scripts>pip3.4.exe install images2gif
You are using pip version 7.0.1, however version 7.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting images2gif
Downloading images2gif-1.0.1.tar.gz
Building wheels for collected packages: images2gif
Running setup.py bdist_wheel for images2gif

Posted in All, Programming, Python. Tagged with , , , .

PySide – Introduction – part 003

I make another tutorial named – PySide – Introduction – part 003.
The main reason come from my opption to share some basic actions and fix some issue when you try to learn PySide and all python submodules.
This is the default script:

The first part of this script come with importing python modules.
Also I have a python class named : MyWidget.
In this class I used the QDial and this will make one round slider with 15 lines, and all settings.

The window application need to be set with one QGridLayout. This will set one grid and the QDial will put over this grid.

You can search over internet about QGridLayout and QDial property and methods.
Let’s see this in action.
You can apply your custom style:

I need to put two QDial and use some simple style :

I will come also with another tutorial about setStyleSheet.

Posted in All, Programming, Python. Tagged with , , , .