Roman's Blog

Random notes of a Python developer

Featured Image

Kodi for Android: Building and Using Binary Python Extensions - Part 2

 Nov. 17, 2016    0 comments 

This is the 2nd article in my series about building and using binary Python modules in Kodi on Android. In the previous article I described prerequisites for building such modules. In this article I will cover building a simple Python/C extension module for Python in Kodi for Android. (...)

Read post

 AndroidCC++KodiPluginPython

Featured Image

Kodi for Android: Building and Using Binary Python Extensions - Part 1

 Nov. 12, 2016    0 comments 

Important WARNING!

On recent Android 7 firmwares for some devices, including my Samsung Galaxy Tab A 10.1, the magic workaround that allows to load binary Python modules from Kodi addons no longer works. This means that currently there is no known way to import binary modules in Python addons on such devices. Because of this the following series of articles now has only historical value since there is a strong chance that you won't be able to use your compiled binary Python module(s).


This is the 1st article in my series about building and using binary Python modules in Kodi on Android. In this article I will cover prerequisites needed to build a Python/C extension module for Python in Kodi for Android. (...)

Read post

 AndroidCC++KodiPluginPython

Featured Image

Kodi for Android: Building and Using Binary Python Extensions - Introduction

 Nov. 11, 2016    0 comments 

This is an introduction to my series of articles that describe how to build binary Python modules for Kodi addons on Android platform.

Kodi mediacenter includes a full-featured (well, almost smile) CPython interpreter for creating plugins. CPython, which is the reference Python implementation, in its turn provides the Python/C API that allows to create a binary Python extension modules in C language. These module are used, for example, to speed-up some CPU-intensive tasks, because Python, being an interpreted language, is relatively slow. (...)

Read post

 AndroidCC++KodiPluginPython

Featured Image

Executing Parallel Tasks in Python with concurrent.futures

 Oct. 31, 2016    0 comments 

Recently I discovered for myself the concurrent.futures Python module. It is the part of the standard library in Python 3 and for Python 2 it can be downloaded from PyPI. This module allows to run multiple time-consuming tasks in parallel in different threads or processes and then to collect the result of those tasks for future use. (...)

Read post

 Python

Featured Image

Django/Jinja2 Language Definition for Prism.js

 Oct. 26, 2016    0 comments 

Recently I made some improvements to this blog CMS in order to better handle code samples in various programming languages. One of the improvements is a brand-new language definition for Prism syntax highlighter. Prism is an easy to use JavaScript library for in-browser code syntax highlighting that supports many languages (programming, markup, configuration etc.). Unfortunately, Django template languages was not among them so I decided to fill-in this gap. And because Jinga2 template syntax is very similar, I decided to make one language definition for both. (...)

Read post

 DjangoJavaScript