My understanding with tmobile is that they will provide you the unlock code to a telephone for free after you have paid for 3 months of service.
I've got tmobile and their world access program, but I just used local SIM cards in Australia when I was there. (I was amused that vodaphone will sell you a SIM card at the airport... They are all set up for that!)