Port of loader to python.