How was __socketFile created? Is there a possibility that it's looking for "\r\n" but only getting "\n"? (I can't remember anything about IronPython's handling of eol.)
On Thu, Mar 28, 2013 at 3:53 PM, Claudio C <[email protected]> wrote: > Hello everybody, > > I'm calling this method with IronPython but this never ends cause the > second call to readline in the while loop never returns. > > This doesn't happend with Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53) > [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on > darwin > > def __getServerReply() : > """ Internal routine. """ > global __socketFile > lines = [] > reply = __socketFile.readline(2048) > idx = reply.find(' ') > if idx < 0: > iReply = simwbConstants.NET_BADREPLYFORMAT > else: > iReply = int(reply[:idx]) > if iReply == simwbConstants.NET_REPLY_EMPTY: > return (iReply,[]) > if iReply == simwbConstants.NET_REPLY_ASCII: > llen = 1 > while llen > 0 : > l = __socketFile.readline(__socketBufSize).rstrip(' \n') > llen = len(l) > if llen > 0: > lines.append(l) > print 'added....' > > return (iReply,lines) > > return (iReply,[]) > > Does anyone know how to fix it? > Many thanks > > _______________________________________________ > Ironpython-users mailing list > [email protected] > http://mail.python.org/mailman/listinfo/ironpython-users > >
_______________________________________________ Ironpython-users mailing list [email protected] http://mail.python.org/mailman/listinfo/ironpython-users
