Skip to content

Instantly share code, notes, and snippets.

View romanvm's full-sized avatar

Roman Miroshnychenko romanvm

View GitHub Profile
@romanvm
romanvm / threadpoolss.py
Last active February 15, 2021 00:36 — forked from kgaughan/threadpoolss.py
All the thread pool mixins for SocketServer are, well, not that good, so I knocked together my own. This one can cleanly shut down the pool
"""
Thread pool extensions to SocketServer.
"""
import Queue
import SocketServer
import sys
import threading
@romanvm
romanvm / multi_select.py
Last active March 22, 2020 19:13
The example of a multi-select dialog in a Kodi addon created with PyXBMCt framework
# The example of a multi-select dialog in a Kodi addon created with PyXBMCt framework.
# You will need a checkmark image file.
import os
import xbmcgui
import xbmcaddon
import pyxbmct.addonwindow as pyxbmct
_addon = xbmcaddon.Addon()
_path = _addon.getAddonInfo("path")
_check_icon = os.path.join(_path, "check.png") # Don't decode _path to utf-8!!!