Re: [Tutor] Looking up a value in a dictionary from user input problem

2009-08-06 Thread Dave Angel
chase pettet wrote: I am trying to write a script to work our LVS implementation. I want to be able to have user do something like this "./script SITE SERVER" and have the script look up the ip value of the site on that server and issue the command to pull the status from LVS. I am almost ther

Re: [Tutor] Looking up a value in a dictionary from user input problem

2009-08-06 Thread Νικόλαος Ράπτης
Hmmm.. First of all.. In the non working code: a = LVS_Site() z = sys.argv[2] b = b["%s" % (sys.argv[1])] c = a.show(b) . Did you really mean b = b["%s" % (sys.argv[1])] or perhaps b = z["%s" % (sys.argv[1])] Also, I can't see why your doing the string formatting in there: b = z[sys.a

Re: [Tutor] Looking up a value in a dictionary from user input problem

2009-08-06 Thread vince spicer
On Thu, Aug 6, 2009 at 3:42 PM, vince spicer wrote: > > > On Thu, Aug 6, 2009 at 3:18 PM, chase pettet wrote: > >> I am trying to write a script to work our LVS implementation. I want to >> be able to have user do something like this "./script SITE SERVER" and have >> the script look up the ip

Re: [Tutor] Looking up a value in a dictionary from user input problem

2009-08-06 Thread vince spicer
On Thu, Aug 6, 2009 at 3:18 PM, chase pettet wrote: > I am trying to write a script to work our LVS implementation. I want to be > able to have user do something like this "./script SITE SERVER" and have > the script look up the ip value of the site on that server and issue the > command to pul

[Tutor] Looking up a value in a dictionary from user input problem

2009-08-06 Thread chase pettet
I am trying to write a script to work our LVS implementation. I want to be able to have user do something like this "./script SITE SERVER" and have the script look up the ip value of the site on that server and issue the command to pull the status from LVS. I am almost there but for some reason