title: Python how to get value from config toml file
body: <p>Hi I am trying to get the value from config.toml file.
  Below is the config.toml file:</p>
  <pre><code>path.repo_uat7=&quot;/home/developer/user1&quot;
  path.repo_uat12=&quot;/home/repo/user21&quot;
  database.hostname.uat7=&quot;dbname7&quot;
  database.hostname.uat12=&quot;dbname12&quot;
  database.port=&quot;1825&quot;
  db.cluster.nodes=[&quot;cluster1:15382&quot;,&quot;cluster2:15382&quot;]
  
  </code></pre>
  <p>I tried getting the value of path.repo_uat7 and path.repo_uat12  by the below python script:</p>
  <pre><code>#!/usr/bin/env python3
  import toml
  import sys, os
  
  data = toml.load(&quot;uat7.toml&quot;)
  print (toml.dumps(data))
  
  desc = str(sys.argv[1])
  st = desc.split(&quot;.&quot;)
  st1 = st[0]
  st2 = st[1]
  
  
  for k1, v1 in data.items():
      if k1 == st1:
       for k2, v2 in v1.items():
         if k2 == st2:
           print(v2)
  </code></pre>
  <p>This is how I run my code: python getvar.py path.repo_uat7. I am getting output as</p>
  <pre><code>/home/developer/user1
  </code></pre>
  <p>But what if I want to get the database or db.cluster.nodes, how to iterate multiple times, I am not getting perfect solution. Please help.</p>