Funnily but I still can't get the code working... WITHOUT IDLE. I think it's because of "import thread" line. Seems something wrong with "opening" this module. In IDLE it works OK.