I have an external program that needs to communicate with mIRC, anyone have any idea which is a faster method of communication?

(Other things such as ease and whatnot apply too, but keep in mind my language of choice will be Python)