Re: Python, Dutch, English, Chinese, Japanese, etc.

2007-06-04 Thread ahlongxp
On Jun 4, 11:54 am, Ross Ridge <[EMAIL PROTECTED]> wrote: > Steve Howell <[EMAIL PROTECTED]> wrote: > > >about Japan: > >major linguistic influences: Chinese, English, > >Dutch > > English and Dutch are minor linguistic influences. > Obviously. But language evolves. > > >Asia: > > > Python

skip next item in list

2007-06-11 Thread ahlongxp
list=('a','d','c','d') for a in list: if a=='a' : #skip the letter affer 'a' what am I supposed to do? -- http://mail.python.org/mailman/listinfo/python-list

Re: skip next item in list

2007-06-11 Thread ahlongxp
Thanks to all of you. I think the next() trick is the one I'm looking for. -- ahlongxp Software College,Northeastern University,China [EMAIL PROTECTED] http://www.herofit.cn -- http://mail.python.org/mailman/listinfo/python-list

socket: connection reset by server before client gets response

2007-07-07 Thread ahlongxp
ody, it'll send back a response message, such as "resource already exists" and close the connection. the problem is, client will never get the response but a "peer reset" exception. any comments or help will be appreciated. -- ahlongxp Software College,Northeastern

Re: socket: connection reset by server before client gets response

2007-07-07 Thread ahlongxp
me again. "Connection reset by peer" happens about one in fifth. I'm using python 2.5.1 and ubuntu 7.04. -- ahlongxp Software College,Northeastern University,China [EMAIL PROTECTED]://www.herofit.cn -- http://mail.python.org/mailman/listinfo/python-list

Re: socket: connection reset by server before client gets response

2007-07-07 Thread ahlongxp
7;Connection reset by peer') -- anyway, server is doing well all the time. any comments on the design or implementation will be greatly appreciated. -- ahlongxp Software College,Northeastern University,China [EMAIL PROTECTED] http://www.herofit.cn -- http://mail.python.org/mailman/listinfo/python-list

Re: socket: connection reset by server before client gets response

2007-07-08 Thread ahlongxp
his really helped. Now I know the client will still get the response even under 'Connection reset by peer' or 'Broken pipe'. > The way you had it the program crashed before it could do the receive. > > Frank Frank, thanks a lot. -- ahlongxp Software College,Northeastern University,China [EMAIL PROTECTED] http://www.herofit.cn -- http://mail.python.org/mailman/listinfo/python-list

socket.makefile() buggy?

2007-07-08 Thread ahlongxp
socket.makefile() may lose data when "connection reset by peer". and socket.recv() will never lose the data. change the "1" to "0" in the client code to see the difference. confirmed on both windows and linux. so I guess there is a problem with makefile(). # Echo server program import socket H

Re: socket: connection reset by server before client gets response

2007-07-08 Thread ahlongxp
> Try to wait a while in the server thread, after sending the > message before closing the connection, to give the message > time to get transmitted. > > time.sleep(0.5) should do it... > > - Hendrik OMG, it works. I can't believe the problem can be solved so easily. Thanks very much. -- http:

Re: socket: connection reset by server before client gets response

2007-07-09 Thread ahlongxp
; For training with a bite, enrol now in Heavy Henry's > Wholesome Hackadamy for Precocious Programmers I feel a little embarrassed now. -- ahlongxp Software College,Northeastern University,China [EMAIL PROTECTED] http://www.herofit.cn -- http://mail.python.org/mailman/listinfo/python-list

Re: socket.makefile() buggy?

2007-07-09 Thread ahlongxp
gt; Skype: holdenweb http://del.icio.us/steve.holden > --- Asciimercial -- > Get on the web: Blog, lens and tag the Internet > Many services currently offer free registration > --- Thank You for Reading - And last but not least, I

Re: socket: connection reset by server before client gets response

2007-07-09 Thread ahlongxp
On Jul 9, 4:30 pm, Adriano Varoli Piazza <[EMAIL PROTECTED]> wrote: > > Gives a whole new meaning to chomp(), byte, nybble, and more :) > I wholeheartedly endorse this effort. I'm sick of reading about > students from WTF University (check thedailywtf.com if you don't know, > but beware. There be

Re: socket: connection reset by server before client gets response

2007-07-09 Thread ahlongxp
On Jul 9, 7:03 pm, Adriano Varoli Piazza <[EMAIL PROTECTED]> wrote: > ahlongxp wrote: > > I feel officially offended. > > I didn't intend to offend you, I was joking. I apologise in any case. > There's a few things to be said, though: > > As per your mess

Re: socket.makefile() buggy?

2007-07-10 Thread ahlongxp
On Jul 11, 7:51 am, [EMAIL PROTECTED] (John J. Lee) wrote: > Steve Holden <[EMAIL PROTECTED]> writes: > > ahlongxp wrote: > >> On Jul 8, 9:54 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > >>> That's a pretty pejorative subject line for someone who&#

Re: How to create new files?

2007-07-13 Thread ahlongxp
in a 1 byte, 2 byte, or 4 > byte value from data into python I have no idea how I would do this. > f.read(10) will read up to 10 bytes. you know what to do now. > Any help is greatly appreciated. Thanks. and another thing to mention, __del__() will not always be called( any comments?). so you'd better flush your file explicitely by yourself. -- ahlongxp Software College,Northeastern University,China [EMAIL PROTECTED] http://www.herofit.cn -- http://mail.python.org/mailman/listinfo/python-list

Re: bool behavior in Python 3000?

2007-07-13 Thread ahlongxp
On Jul 11, 5:36 am, Bjoern Schliessmann wrote: > Is there any type named "bool" in standard Python? check this out. >>> doespythonrock = True >>> print type(doespythonrock) >>> -- ahlongxp Software College,Northeastern University,China [EMAIL PRO

some parts of wxPython broken on Mac

2007-07-24 Thread ahlongxp
el) and I found wx.lib.flatnotebook and wx.xrc were broken(which are quite OK under both Linux and Windows). because I don't have the machine, I can't give more details. I hope someone will be good enough to check out these problems. -- ahlongxp Software College,Northeastern University,Chi