Woot! Good job. Maybe on some primal level your snake knows you are trying to help.
Or, contrary to most beliefs, maybe your snake is secretly keeping YOU as a pet, and sends subliminal messages to you with commands. "Take me out." "Feed me." etc, and was just ordering you to administer the medication and was therefore relaxed.