Python

Discussion in 'Tech' started by ShadowWolf, Sep 30, 2010.

  1. ShadowWolf New Member

    Posts:
    290
    Trophy Points:
    0
    Location:
    Charleston, SC
    Hey guys, I'm hoping some of you are programming gurus and can point me in the right direction. My company has me on track to learn various skills quickly in preparation for a move into a new position a bit down the road.

    I am a network engineer right now, specifically I work mainly on firewalls and perimeter routers. Haven't had much need for scripting so far. In any case, now I need to learn python, and the faster the better. Basically just looking for where to start as far as web resources, books, classes, videos, advice, etc. I am not a complete programming noob I know all the basics (input/output,strings,functions,iteration,loops, etc) but nothing much specific to python.

    Thanks, if I can pick this up in a reasonable amount of time this will open doors for me.
  2. Phant0m51 From Utah, NOT mormon

    Posts:
    2,408
    Trophy Points:
    53
    Location:
    Utah, USA
  3. c_raidz Junior Member

    Posts:
    13
    Trophy Points:
    16
    Python is a very easy language to learn if you've done any bit of scripting (batch included). I only do what's necessary for my job, which hasn't needed Python yet (like server scripts (usually VB or batch, now PowerShell) for student account creation, backup jobs, etc.). The neat thing about Python is that it is cross-platform, and you can do things like add a string to a number.

    Here is every online resource I've saved on it while I took a class on it:
    http://effbot.org/pyfaq/
    http://docs.python.org/library/functions.html
    http://docs.python.org/library/stdtypes.html#string-methods
    http://www.fnal.gov/docs/products/python/v1_5_2/tut/node6.html
    http://ada.rg16.asn-wien.ac.at/~python/how2think/english/chap07.htm
    http://courses.ischool.berkeley.edu/i256/f06/papers/programming_tutorial.pdf
    http://www.techiwarehouse.com/cms/engine.php?page_id=be9e43e1
    http://snipplr.com/

    Here is a program I created the first week of class (I think):
    #4-2: Randomly select and print six integers from the range 1 through 6, but with no duplicates.

    Code:
    # Assignment Y04A1 and 2
    # C R - CS351
    #Randomly select and print six integers from the range 1 through 6.
    #2: Without duplicates
    
    import random
    
    #Create a list so we can avoid duplicates.
    myLst = []
    
    #Create a loop for random.
    for aNum in range(100):
        myNum = random.randint(1, 6)
        if myNum in myLst:  #Check to see if we've already chosen that number
            continue        #If we have, keep going!
        else:
            myLst.append(myNum) #If we haven't chosen it, add it to the list
        
    print myLst
    Also, I only check these forums once every few months or so, so good luck!
  4. ShadowWolf New Member

    Posts:
    290
    Trophy Points:
    0
    Location:
    Charleston, SC
    Thanks for the links. Quite helpful.

    I am coming along better than I thought. Things that were over my head months ago I can clearly grasp. Yet there are so many things that are still way over my head...

    One of the end goals is to learn malware analysis, so next I will be learning C next and eventually I will be getting into assembly. I am at least a year away from that though.

    Its good that my company has long term plans for me.