Confusing python problem
<p>As part of a large python program I have the following code:</p>

<pre><code>for arg in sys.argv:
    if "name=" in arg:
            name = arg[5:]
            print(name)
    elif "uname=" in arg:
            uname = arg[6:]
            print(uname)
    elif "password=" in arg:
            password = arg[9:]
            print(password)
    elif "bday=" in arg:
            bday = arg[5:]
            print(bday)
    else:
            pass
</code></pre>

<p>The program expects something like:</p>

<pre><code>python prog.py "name=Kevin" "uname=kevin" "password=something" "bday=01/01/01"
</code></pre>

<p>When I try to use "uname" later, the program fails, claiming "uname is not defined"
I added the "print()" lines to try and debug and the "print(uname)" always shows "=kevin" regardless of the index number I put there (here "6:"). The other statements seem to work fine. Is this a bug in python? I am very confused.</p>

<p>Thanks in advance.</p>
