thank you so much... it worked
but u did say that joining threads like that is not a good idea...I am really in the beginner level...so could you explain why you said so..if its ok for u ......
User Profile
Collapse
-
socket.inet_aton () in python
please try to help me out with this one....
i am reading IP addresses from command line I need to convert them into their decimal equivalents...a nd priint them
i have to use the socket.inet_ato n() function right ?
but i am not able to print the converted value...
like i am trying the code as
print "decimal equivalent is = %d " %(socket.inet_a ton(sys.srgv[0]))... -
I declared a list as I had to append some threads into it.
These 2 lines of code were written in one function. In another function I want to join them like:Code:global th = [] th.append(thread)
But this code throws an error telling that global th= [] is invalid syntax.Code:for t in th t.join()Last edited by Niheel; May 21 '10, 04:21 AM. Reason: Please read guidelines on how to post questions and answers on Bytes. Punctuation and grammar were fixed. Code tags appliedLeave a comment:
-
How to declare a LIST as GLOBAL in python
Can we declare using th keyword "global" in declaring a global array?
ie like global arr = []
This throws an error saying invalid syntax.
No activity results to display
Show More
Leave a comment: