roar/librtl/Rtl.py
Lucio Andrés Illanes Albornoz bc969295dd Various bugfixes & usability improvements.
1) Backend: initial optimised cell rendering Python C module implementation skeleton.
2) Backend: raise alpha blending {fore,back}ground colour coefficient to {0.8,1.0 - 0.8}, resp.
3) Backend: reimplement cell rendering using Draw{Rectangle,Text}List().
4) Canvas window: eliminate {canvas,{scroll,tool}bar} flickering during resize.
5) Canvas window: fix cursor artifacts during resizing by masking cursor.
6) Canvas window: restore cursor after executing operations that remove it.
7) Import store: correctly parse non-conforming \u0003,<bg colour> sequences.
8) GUI: correctly save list of recently used files post-update.
2019-10-01 19:03:29 +02:00

19 lines
518 B
Python

#!/usr/bin/env python3
#
# Rtl.py
# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de>
# This project is licensed under the terms of the MIT licence.
#
import re
def flatten(l):
return [li for l_ in l for li in l_]
def natural_sort(l):
convert = lambda text: int(text) if text.isdigit() else text.lower()
alphanum_key = lambda key: [convert(c) for c in re.split('([0-9]+)', key)]
return sorted(l, key=alphanum_key)
# vim:expandtab foldmethod=marker sw=4 ts=4 tw=120