User Profile

Collapse

Profile Sidebar

Collapse
getmanup
getmanup
Last Activity: Aug 2 '10, 01:16 PM
Joined: May 20 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • getmanup
    replied to How to declare a LIST as GLOBAL in python
    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 ......
    See more | Go to post

    Leave a comment:


  • getmanup
    started a topic socket.inet_aton () in python

    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]))...
    See more | Go to post

  • getmanup
    replied to How to declare a LIST as GLOBAL in python
    I declared a list as I had to append some threads into it.
    Code:
    global th = []
    th.append(thread)
    These 2 lines of code were written in one function. In another function I want to join them like:
    Code:
    for t in th
         t.join()
    But this code throws an error telling that global th= [] is invalid syntax.
    See more | Go to post
    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 applied

    Leave a comment:


  • getmanup
    started a topic How to declare a LIST as GLOBAL in python

    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.
    See more | Go to post
    Last edited by Niheel; May 21 '10, 04:19 AM. Reason: punctuation, grammar,
No activity results to display
Show More
Working...