Re: mulithreaded server

2008-03-13 Thread Tim Roberts
asit <[EMAIL PROTECTED]> wrote: > >In the above program, why there is an unhandeled exception ??? Probably because the code as you posted it has at least a half-dozen mistakes. >import socket >import sys >import thread > >p=1 >PORT=11000 >BUFSIZE=1024 > >def getData(cSocket): >global stdoutlo

Re: mulithreaded server

2008-03-11 Thread castironpi
> > >In the above program, why there is an unhandeled exception ??? > > > Just a guess. You should really include the traceback when you ask a > > question like this. > > It's not a traceback error. It's an unhandeled exception. Have a look at this: http://groups.google.com/group/comp.lang.python

Re: mulithreaded server

2008-03-11 Thread Aahz
In article <[EMAIL PROTECTED]>, asit <[EMAIL PROTECTED]> wrote: >On Mar 11, 9:10 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >> On Tue, 11 Mar 2008 08:24:54 -0700 (PDT), asit <[EMAIL PROTECTED]> wrote: >>> >>>In the above program, why there is an unhandeled exception ??? >> >> Just a guess.

Re: mulithreaded server

2008-03-11 Thread asit
On Mar 11, 9:10 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Tue, 11 Mar 2008 08:24:54 -0700 (PDT), asit <[EMAIL PROTECTED]> wrote: > >import socket > >import sys > >import thread > > >p=1 > >PORT=11000 > >BUFSIZE=1024 > > >def getData(cSocket): > >global stdoutlock,cSocketlock > >

Re: mulithreaded server

2008-03-11 Thread Jean-Paul Calderone
On Tue, 11 Mar 2008 08:24:54 -0700 (PDT), asit <[EMAIL PROTECTED]> wrote: >import socket >import sys >import thread > >p=1 >PORT=11000 >BUFSIZE=1024 > >def getData(cSocket): >global stdoutlock,cSocketlock >while True: >cSocketlock.acquire() >data=cSocket.recv(BUFSIZE) >

mulithreaded server

2008-03-11 Thread asit
import socket import sys import thread p=1 PORT=11000 BUFSIZE=1024 def getData(cSocket): global stdoutlock,cSocketlock while True: cSocketlock.acquire() data=cSocket.recv(BUFSIZE) if data=='q': data='client exited' cSocket.close()