title: ValueError: need more than 1 value to unpack
body: <p>Disclaimer: I have read the thread located at <a href="https://stackoverflow.com/questions/2814128/valueerror-need-more-than-1-value-to-unpack">Python Error: &quot;ValueError: need more than 1 value to unpack&quot;</a>, and none of the answers explained how to actually get the code to run.</p>
  
  <p>I am reading Learn Python the Hard Way, and I am on Exercise 13.</p>
  
  <p>Here is the code I am attempting to run in the IDLE thing (don't know what it is really called) for Python 2.7:</p>
  
  <pre><code>from sys import argv
  
  script, first, second, third = argv
  
  print "The script is called:", script
  print "Your first variable is:", first
  print "Your second variable is:", second
  print "Your third variable is:", third
  </code></pre>
  
  <p>When run, I get the error:</p>
  
  <p>"Traceback (most recent call last):
    File "C:\Python\LPTHW\examples_LPTHW\ex13.py", line 3, in 
      script, first, second, third = argv
  ValueError: need more than 1 value to unpack"</p>
  
  <p>I have tried running the program through the Windows command prompt, to no avail. I have also run the program by typing: "python ex13.py first 2nd 3rd", in both the IDLE and the command prompt, also got the same error.</p>
  
  <p>How do I get this code to run, and what the heck am I doing wrong?</p>
  
  <p>EDIT: @John Machin, I made a program exactly like the one you posted, saved it as a .py, then went into the correct directory where my file was saved, ran the program using "python yourcode.py B C D" and I received the following message "python is not recognized as an internal or external command..." When I run the program by just typing it's name (which works for all other programs besides this one) I get an error saying "SyntaxError: invalid syntax on line 2: print len(argv), repr(argv)".</p>
  
  <p>EDIT 2 (With the new code): @John Machin, I copied your program word for word into gedit and made the .py file as usual. I opened my terminal (command prompt) and typed:</p>
  
  <pre><code>python ex13c.py B C D
  </code></pre>
  
  <p>And received:</p>
  
  <pre><code>'python' is not recognized as an internal or external command, operable program or batch file."
  </code></pre>
  
  <p>Then I typed:</p>
  
  <pre><code>ex13c.py
  </code></pre>
  
  <p>And received:</p>
  
  <pre><code>3.1.3 (r313:86834, Nov 27 2010, 18:30:53) [MSC v.1500 32 bit (Intel)]
  1 ['C:\\Python\\LPTHW\\examples_LPTHW\\ex13c.py']
  Traceback (most recent call last):
    File "C:\Python\LPTHW\examples_LPTHW\ex13c.py". line 4, in (module)
      a, b, c, d = argv
  ValueError: need more than 1 value to unpack
  </code></pre>
  
  <p>Keep in mind I am running W7 64bit, and that Zed is teaching in 2.X and I have been using 2.7 the entire book so far. Every other example has worked. Right before I started Example 11, I installed 3.1 for a different book I am about to start reading. Every time I use the IDLE included with 2.7. Perhaps it is possible I am somehow inadvertently using 3.1 while trying to code in 2.7?</p>
  
  <p>Thanks for bearing with me.</p>