Switching between Docker and VirtualBox on Windows 10

As outlined here, Docker for Windows requires Hyper-V. This needs to be disabled before you can run VirtualBox.

# Run from elevated prompt (admin privileges)
bcdedit /set hypervisorlaunchtype off

And to start using Docker for Windows again, re-enable Hyper-V:

# Run from elevated prompt (admin privileges)
bcdedit /set hypervisorlaunchtype auto

A reboot is required in both cases.

Note: if you only see 32-bit options when creating a VM in VirtualBox, it could be because you havent disabled Hyper-V. More info here on this issue.

Official PySide2 wheels!

The Qt Company has released official and pip-installable PySide2 wheel snapshots!

Simo posted the details today on the PySide mailing list, but in a nutshell:

pip install --index-url=http://download.qt.io/snapshots/ci/pyside/5.9/latest/ pyside2 --trusted-host download.qt.io

Standalone PySide2 wheels

The Qt Company has yet to release official, standalone and pip-installable PySide2 wheels. However, since they made it possible to build standalone wheels successfully, I’m now building such unofficial, standalone wheels here using free CI services (thanks Travis and AppVeyor!):


Dates and databases with Python

It’s a bit tricky to deal with dates, timezones and daylight savings when you need to store dates in e.g. a database for later reading.

To me, it’s a bit perplexing that all tools required to deal with this doesn’t come with the Python standard library (meaning; batteries are not included). Instead we need to use three different modules: datetime, pytz and tzlocal where the two latter ones are not part of the standard library and must be installed separately via e.g. pip.

Here follows some personal notes on how to store and read back dates with reliability and control of the timezones and daylight savings.


Querying the FPS preference in Maya

This tickles the funny bone.

>>> import maya.mel as mel
>>> fps = mel.eval('float $fps = `currentTimeUnitToFPS`')
>>> print(fps)