title: SyntaxError: invalid syntax, clause on '=' in eval() function
body: <p>I'm having the following trouble with my program:</p>
  
  <pre class="lang-none prettyprint-override"><code>File "C:/Users/6ixpage/Documents/SoftwareDevelopment/Python/Programs/CLI/
  PrintandCopy/P&amp;C Job System.py", line 75, in set
       eval('self.details['+a+'].'+b+'"'+c+'"');
  File "&lt;string&gt;", line 1
       self.details[0].file = "image"
                            ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>Here's the code snippet for reference:</p>
  
  <pre><code>IN = ('details','0','file','image')
  if IN[0] == 'details':
      a = IN[1]
      b = IN[2]
      c = IN[3]
      print('self.details['+a+'].'+b+' = "'+c+'"');
      eval('self.details['+a+'].'+b+' = "'+c+'"');
  </code></pre>
  
  <ul>
  <li><code>IN[0]</code> - used to identify that the command specifies the details of the folder.
  *</li>
  <li><code>IN[1]</code> - the task within the folder.
  *</li>
  <li><code>IN[2]</code> - the attribute of the task (any of type, file, quantity, tally).
  *</li>
  <li><code>IN[3]</code> - the value to set the attribute to.</li>
  </ul>
  
  <p>The entire code is <a href="https://drive.google.com/open?id=0B_FdEIbU4EzwbXVGOFp4QmZkejQ" rel="nofollow noreferrer">here</a>, unfortunately undocumented as I originally wanted to only have a simple CUI setup. But do quiz me if you have any questions about particular snippets. I have paper documentation too, that shows how the program is supposed to work.</p>
  
  <p>If you can suggest some changes to how the CUI works please do, especially if they will cause less headaches than the one I currently have. (And I'm certain that I don't have to use <code>eval()</code> for every single function.)</p>