Wildlife ranger was almost crushed by a 30ft python