python version of AIR loading script