An optimized python EDF loader