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
> > >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
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.
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
> >
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)
>
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()