Better python handling