title: generating list/array from a text file in LUA
body: <p>I'm trying to handle a text file containing a list of numbers (generated from a python script) into a LUA script.</p>
  <p>the text file contain this (I formatted it in the python script to match the list syntax of LUA) :</p>
  <pre><code>{&quot;0.0&quot;, &quot;0.1&quot;, &quot;0.2&quot;, &quot;0.3&quot;, &quot;0.4&quot;, &quot;0.5&quot;, &quot;0.6&quot;, &quot;0.7&quot;, &quot;0.8&quot;, &quot;0.9&quot;, &quot;1.0&quot;, &quot;834.3&quot;, &quot;1667.6&quot;, &quot;2500.9&quot;, &quot;3334.2&quot;, &quot;4167.5&quot;, &quot;5000.8&quot;, &quot;5834.1&quot;, &quot;6667.4&quot;, &quot;7500.7&quot;, &quot;8334.0&quot;, &quot;9167.3&quot;, &quot;10000.6&quot;, &quot;10833.9&quot;, &quot;11667.2&quot;, &quot;12500.5&quot;, &quot;13333.8&quot;, &quot;14167.1&quot;, &quot;15000.4&quot;, &quot;15833.7&quot;, &quot;16667.0&quot;, &quot;17500.3&quot;, &quot;18333.6&quot;, &quot;19166.9&quot;, &quot;20000.2&quot;, &quot;20833.5&quot;, &quot;21666.8&quot;, &quot;22500.1&quot;, &quot;23333.4&quot;, &quot;24166.7&quot;, &quot;25000.0&quot;, &quot;22244444.44&quot;, &quot;44463888.89&quot;, &quot;66683333.33&quot;, &quot;88902777.78&quot;, &quot;111122222.22&quot;, &quot;133341666.67&quot;, &quot;155561111.11&quot;, &quot;177780555.56&quot;, &quot;200000000.0&quot;, }
  </code></pre>
  <p>However when I try to read it in LUA, first I use this command (where &quot;params.style_weight_list&quot; is a link to the text file previously generated) :</p>
  <pre><code>print(&quot;SW LIST = &quot;,params.style_weight_list)
  </code></pre>
  <p>which gives me this result :</p>
  <pre><code>SW LIST =   {&quot;0.0&quot;, &quot;0.1&quot;, &quot;0.2&quot;, &quot;0.3&quot;, &quot;0.4&quot;, &quot;0.5&quot;, &quot;0.6&quot;, &quot;0.7&quot;, &quot;0.8&quot;, &quot;0.9&quot;, &quot;1.0&quot;, &quot;834.3&quot;, &quot;1667.6&quot;, &quot;2500.9&quot;, &quot;3334.2&quot;, &quot;4167.5&quot;, &quot;5000.8&quot;, &quot;5834.1&quot;, &quot;6667.4&quot;, &quot;7500.7&quot;, &quot;8334.0&quot;, &quot;9167.3&quot;, &quot;10000.6&quot;, &quot;10833.9&quot;, &quot;11667.2&quot;, &quot;12500.5&quot;, &quot;13333.8&quot;, &quot;14167.1&quot;, &quot;15000.4&quot;, &quot;15833.7&quot;, &quot;16667.0&quot;, &quot;17500.3&quot;, &quot;18333.6&quot;, &quot;19166.9&quot;, &quot;20000.2&quot;, &quot;20833.5&quot;, &quot;21666.8&quot;, &quot;22500.1&quot;, &quot;23333.4&quot;, &quot;24166.7&quot;, &quot;25000.0&quot;, &quot;22244444.44&quot;, &quot;44463888.89&quot;, &quot;66683333.33&quot;, &quot;88902777.78&quot;, &quot;111122222.22&quot;, &quot;133341666.67&quot;, &quot;155561111.11&quot;, &quot;177780555.56&quot;, &quot;200000000.0&quot;, }    
  </code></pre>
  <p>yet everything seems good (there is several blank spaces before the first bracket, don't know why though)</p>
  <p>but when I try to access a specific item from the list this way (frameIdx is an int) :</p>
  <pre><code>local neu_sw = params.style_weight_list[frameIdx]
  </code></pre>
  <p>it return a nil value, so I think I got to convert the imported list from a string to a proper usable list in LUA but don't know how ? anybody has an idea ?</p>