Re: newbie: concatenate literals (using jython)

2005-12-23 Thread razornl
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

Re: newbie: concatenate literals (using jython)

2005-12-22 Thread Tomasz Lisowski
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > >>I'm using Jython (actually WebLogic WLST), and trying to do something >>really simple. I want to create a string from two function calls and a >>literal, like: >> >> serverport = server.getListenAddress() + ':' + server.getListenPort() >> >>

Re: newbie: concatenate literals (using jython)

2005-12-22 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I'm using Jython (actually WebLogic WLST), and trying to do something > really simple. I want to create a string from two function calls and a > literal, like: > > serverport = server.getListenAddress() + ':' + server.getListenPort() > > This complains: > > TypeError:

newbie: concatenate literals (using jython)

2005-12-22 Thread davidmichaelkarr
I'm using Jython (actually WebLogic WLST), and trying to do something really simple. I want to create a string from two function calls and a literal, like: serverport = server.getListenAddress() + ':' + server.getListenPort() This complains: TypeError: __add__ nor __radd__ defined for these o