title: How to display key value pair output of a bash command using python
body: <p>Below is the output neutron-net show command, this is an openstack command output. I want to display value of name,provider:network_type and provider:segmentation value in a single line . I have tried python and mix of bash scripts, but it doesn't work. Any idea, this can be done using python ?</p>
  
  <pre class="lang-none prettyprint-override"><code># for i in $(neutron net-list -f value -c name); do neutron net-show -c name -c segments -f json $i ; done
  {
    "segments": "{\"provider:network_type\": \"vxlan\", \"provider:physical_network\": null, \"provider:segmentation_id\": 333}\n{\"provider:network_type\": \"vlan\", \"provider:physical_network\": \"DCGW-NET1\", \"provider:segmentation_id\": 259}",
    "name": "_MGMT"
  }{
    "segments": "{\"provider:network_type\": \"vlan\", \"provider:physical_network\": \"NET1\", \"provider:segmentation_id\": 388}\n{\"provider:network_type\": \"vxlan\", \"provider:physical_network\": null, \"provider:segmentation_id\": 5344}",
    "name": "sp1"
  }{
    "name": "test_emma"
  }{
    "segments": "{\"provider:network_type\": \"vxlan\", \"provider:physical_network\": null, \"provider:segmentation_id\": 5214}\n{\"provider:network_type\": \"vlan\", \"provider:physical_network\": \"NET1\", \"provider:segmentation_id\": 214}",
    "name": "test_MGMT"
  }^
  </code></pre>