Use nuitka for compiling, reorganize py files

This commit is contained in:
adrienmalin
2018-08-19 23:28:22 +02:00
parent 8139bf8154
commit 54bce41d50
13 changed files with 2140 additions and 2176 deletions

View File

@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
import re
first_cap_re = re.compile('([^.])([A-Z][a-z]+)')
all_cap_re = re.compile('([a-z0-9])([A-Z])')
def snake_case(s):
"""
Convert a CamelCase string to snake_case
"""
s1 = first_cap_re.sub(r'\1_\2', s)
return all_cap_re.sub(r'\1_\2', s1).lower()