On 26/08/2013 10:54, chandan kumar wrote:
Hi all,
Please see the below code,in which i'm verifying the global value in python.
CHK=10
def test1():
print "Value of CHK in test1",CHK
def test2():
CHK=40
print "Value of CHK in test2",CHK
test1()
def test3():
global CH
On Mon, Aug 26, 2013 at 5:54 AM, chandan kumar wrote:
> Hi all,
>
> Please see the below code,in which i'm verifying the global value in python.
>
> CHK=10
>
> def test1():
> print "Value of CHK in test1",CHK
>
> def test2():
> CHK=40
> print "Value of CHK in test2",CHK
> test1()
Hi all,
Please see the below code,in which i'm verifying the global value in python.
CHK=10
def test1():
print "Value of CHK in test1",CHK
def test2():
CHK=40
print "Value of CHK in test2",CHK
test1()
def test3():
global CHK
test2()
test3()
When i ran above code ,I
Then after defining clientsock, write a print statement as "print
clientsock", see what it will print, None or a object?
Sönmez
ANIL KARADAĞ wrote:
> ok , arranged block.but program give error global name 'clientsock' is not
> defined " ,..
>
> 2007/3/17, Sönmez Kartal <[EMAIL PROTECTED]>:
>>
>
hi, i made a program in python but received global name error. the program
code;
serverhost = '127.0.0.1'
serverport = 2000
BUFSIZ = 1024
addr = (serverhost,serverport)
if str(sys.argv).find("-s") == -1:
cs = socket(AF_INET, SOCK_STREAM,0) # create a TCP socket
cs.c