analitics

Pages

Friday, February 27, 2015

News: Python 3.4.3 is out.

Python 3.4.3 was released on February 25th, 2015 with many bugfixes and other small improvements.
More about that and can be found here.
This are the new library modules from this new release :
  • asyncio: New provisional API for asynchronous IO (PEP 3156).
  • ensurepip: Bootstrapping the pip installer (PEP 453).
  • enum: Support for enumeration types (PEP 435).
  • pathlib: Object-oriented filesystem paths (PEP 428).
  • selectors: High-level and efficient I/O multiplexing, built upon the select module primitives (part of PEP 3156).
  • statistics: A basic numerically stable statistics library (PEP 450).
  • tracemalloc: Trace Python memory allocations (PEP 454).
NOTE: The PEP contains the index of all Python Enhancement Proposals are assigned by the PEP editors, and once assigned are never changed

Saturday, February 7, 2015

Install PyOpenGL with pip with wheel and WHL file .

This is a old tutorial I wrote about how to install python on windows 8.1 with distribute, pip, virtualenv and virtualenvwrapper-powershell.
Now I will show you how to deal with WHL files and pip wheel.
First you need to install pip under your python folder.
I used in this case Python 2.7 version.
The WHL file and wheel is a ZIP-format archive with a specially formatted filename and the .whl extension.
You can use this :
C:\Python27\Scripts>pip2.7 install wheel
Collecting wheel
  Downloading wheel-0.24.0-py2.py3-none-any.whl (63kB)
    100% |################################| 65kB 682kB/s ta 0:00:011
Installing collected packages: wheel

Successfully installed wheel-0.24.0

C:\Python27\Scripts>pip2.7 install --upgrade pip
Collecting pip from https://pypi.python.org/packages/py2.py3/p/pip/pip-6.0.8-py2
.py3-none-any.whl#md5=41e73fae2c86ba2270ff51c1d86f7e09
  Downloading pip-6.0.8-py2.py3-none-any.whl (1.3MB)
    100% |################################| 1.3MB 952kB/s ta 0:00:01
This will install wheel and update the pip2.7 .
For example, just use next command to install OpenGL python module.
C:\Python27\Scripts>pip2.7 install PyOpenGL
Collecting PyOpenGL
  Downloading PyOpenGL-3.1.0.tar.gz (1.2MB)
    100% |################################| 1.2MB 2.2MB/s ta 0:00:01
Installing collected packages: PyOpenGL
  Running setup.py install for PyOpenGL
Successfully installed PyOpenGL-3.1.0
Also pygame whl working with pip2.7.
I download it from pygame website, from here. Download your version of WHL file ( amd64 is for CPU 64 bits) and your python version (cpxx). Now use this command:
C:\Python27\Scripts>pip2.7.exe install "C:\Downloads\pygame-1.9.2a
0-cp27-none-win_amd64.whl"
...
Installing collected packages: pygame
  Found existing installation: pygame 1.9.1
    DEPRECATION: Uninstalling a distutils installed project (pygame) has been de
precated and will be removed in a future version. This is due to the fact that u
ninstalling a distutils project will only partially uninstall the project.
    Uninstalling pygame-1.9.1:
      Successfully uninstalled pygame-1.9.1

Successfully installed pygame-1.9.2a0

Sunday, January 4, 2015

News: FOSDEM 2015 and python room.

FOSDEM is a free event that offers open source communities a place to meet, share ideas and collaborate. It is renowned for being highly developer-oriented and brings together 5000+ geeks from all over the world.
You can find a schedule of python room here.
The FOSDEM 2015 will take place at ULB Campus Solbosch on Saturday 31 January and Sunday 1 February 2015 - Brussels.
Also no registration necessary on this event , according to FOSDEM website.

Friday, January 2, 2015

Python and last version of Notepad++ 6.7.3

The last version of Notepad++ has released at 2015-01-01.
It comes with many features and fix also some bugs:
  • Syntax Highlighting and Syntax Folding;
  • User Defined Syntax Highlighting and Folding;
  • PCRE (Perl Compatible Regular Expression) Search/Replace;
  • GUI entirely customizable: minimalist, tab with close button, multi-line tab, vertical tab and vertical document list;
  • Document Map;
  • Auto-completion: Word completion, Function completion and Function parameters hint;
  • Multi-Document (Tab interface);
  • Multi-View;
  • WYSIWYG (Printing);
  • Zoom in and zoom out: Ctr key + Mouse Wheel ;
  • Multi-Language environment supported;
  • Bookmark;
  • Macro recording and playback;
  • Launch with different arguments;
I try it with python 3.4 and working very well.
First I download it from here.
I install it and I set it to working.

I wrote a simple python 3.4 script and then I press F5 key - Run from Notepad++.
import os 
import sys 
print ("this is notepad test - python run")

I put this in this window to run it python 3.4 : C:\Python34\Lib\idlelib\idle.bat "$(FULL_CURRENT_PATH)"

Also I press save button and select Ctr+Alt+P to run the scripts with hotkeys. This can be see it under Run menu.
When I press it then a python window with your script will show us and just you need is to press F5 key to run it.

Monday, December 29, 2014

WinPython - 32 and 64bit portable distribution with Qt.

The new WinPython (version 3.3.5.4) released at 2014-12-22 come with this issue:
WinPython is a free open-source portable distribution of the Python programming language for Windows XP/7/8, designed for scientists, supporting both 32bit and 64bit versions of Python 2 and Python 3.
I use 64bit portable distribution with Python 3.3.5 (v3.3.5:62cf4e77f785, Mar 9 2014, 10:35:05) [MSC v.1600 64 bit (AM
D64)] on win32 and working very well.
From this link you can download it.
WinPython is a free scientific Python distribution for Windows that is portable.It is completely isolated from the rest of the system. Also, WinPython can be installed in a folder (will be put into your download folder)and can be moved anywhere.
You can move on an USB stick and this will make entirely functional.
WinPython is bundled with a lot of existing Python packages.
Also, it includes graphical and command-line utilities to install/uninstall any Python package easily.

This come with spyder 2.3.2 version editor to edit your scripts.

You can use also Qt with Qt designer and you also have a demo application, see:

Sunday, December 21, 2014

pygame - using sound, mixer, volume, channels, fade-in and out effect .

PyGame module come with sound feature and this allow users to test some effects.
The next tutorial show you how to deal with pygame sound effect.
After, you can test all effects with python version 3.4.1 .
I used keys to change effects. The song is a ogg file.
I used this sample from a recording of of the album Through the Devil Softly by the artist Hope Sandoval and The Warm Inventions from here.