Tag Archives: python

WinPython – news and old stuff.

First good news: the team tells us 18 hours ago about the WinPython will come with new release of WinPython.
This will be version of WinPython and this will be great for most of users.
I love this portable python because first is easy to use and can easy test my python scripts.
One goal of this portable python it’s the demos. I found some great demos with PyQt4 and networkx.
Also you can use Spyder to make your python scripts.
It’s a free open-source development environment for the Python programming language.
This visual interface similar to MATLAB where you can run commands, edit and debug programs, check the values of variables and the definitions of functions, etc.
If you just getting started with Python then just take a look at google.com/edu/python.
The WinPython Control Panel allows to register your WinPython distribution to Windows with Advanced – Register distribution …:
…and this allow you to:

  • associate file extensions .py, .pyc and .pyo to Python interpreter
  • register Python icons in Windows explorer
  • add context menu entries Edit with IDLE and Edit with Spyder for .py files
  • register WinPython as a standard Python distribution in the registry (the same way as the standard Python Windows installers will do)

Also you can use Jupyter Notebook web application.
This allow you to:
The Jupyter Notebook is a web application that allows you to create and share documents that contain live code, equations, visualizations and explanatory text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, machine learning and much more.

Posted in news. Tagged with , , .

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 , , , .