Python Get Current Method Used To Communicate