Noraslinda Asat was using the bathroom in her Eunosville home when she felt a sharp pain.
She stood up and found the jaws of a 6-foot python clamped on the back of her right thigh.
After several attempts at grabbing the snake, she managed to pull it off.
Asat was taken to a hospital where she received an injection and was discharged, 'The New Paper' reported.
The incident happened earlier this month and the snake has not been caught.
The woman is so traumatised that she has refused to use the toilet at home, preferring to go to public ones instead.