python implementation of an OS only index