Skip to content

Posts

Qt.py on conda-forge

Qt.py is now available on conda-forge!

# Enable conda-forge
conda config --add channels conda-forge

# Create environment with Python 3.6, PySide2 and Qt.py
conda create --mkdir --prefix ~/condaenvs/myenv python=3.6 pyside2 qt.py

# Run Python
~/condaenvs/myenv/bin/python --version

# Run pip
~/condaenvs/myenv/bin/pip --version

An alternative to building PySide2 from source

I've received questions lately on the issues that people are having while attempting to build PySide2 on Windows, macOS and Linux. Instead of building PySide2, there's actually a workaround which works just as well for some people...

Vendoring Qt.py

How do you know a user doesn't have the wrong version of Qt.py when running your application?
– Simple, you bundle Qt.py with your application. Here's a short write-up on how you could go about doing just that.

Docker cleanup

Quick and easy way to remove all containers (and their volumes) as well as all images:

# Remove containers and their volumes
docker stop $(docker ps -a -q)
docker rm -v $(docker ps -a -q)

# Remove images
docker rmi -f $(docker images -q)

# Remove unused images
docker system prune --all

Combine filters, 'xargs etc:

# Stop all containers of a certain name
docker stop $(docker ps -q --filter name=mycontainer)

# Run containers based on folder/file names (use '%' where you want to insert the value corresponding to the file/folder name)
touch c1 c2 c3
ls | xargs -I % docker run --rm --name % hello-world:latest