Note that "getListenPort()" returns an int. Is that a problem? yes, that's a problem. Python needs strings for concatenation apparently. you can use the .toString() methon on the int to convert it to a string ;) a=1 s='hello' print s+a TypeError: __add__ nor __radd__ defined for these operands print s+a.toString() hello1