Skip to content

Instantly share code, notes, and snippets.

View csaez's full-sized avatar

Cesar Saez csaez

View GitHub Profile
@csaez
csaez / std_modules.py
Created January 7, 2018 03:33
print modules from python std library
import os
import sys
from distutils import sysconfig
def std_modules():
std_lib = sysconfig.get_python_lib(standard_lib=True)
for top, dirs, files in os.walk(std_lib):
for nm in files:
@csaez
csaez / resize_row_via_delegate.py
Last active January 4, 2020 16:38
QtreeView: keep aspect ratio when resizing a column
import sys
from PyQt5 import QtWidgets, QtGui, QtCore
def fetch_data():
return [
{
'name': 'horizontal',
'image': {
'colour': (255, 0, 0),