title: Graph traversal with Networkx (Python)
body: <p>I'm playing a bit with Networkx to manage a graph of dependencies.
  Let's say I have this Graph which each letter represent a server</p>
  
  <pre><code>&gt;&gt;&gt; G = nx.Graph()
  &gt;&gt;&gt; G.add_edge("A","B")
  &gt;&gt;&gt; G.add_edge("A","H")
  &gt;&gt;&gt; G.add_edge("H","C")
  &gt;&gt;&gt; G.add_edge("B","C")
  &gt;&gt;&gt; G.add_edge("B","D")
  
             A
           /   \
         H       B
       /        /  \
     C         C     D 
  </code></pre>
  
  <p>So here we can see that before starting A we need to start H and B and to start H we need to start C and then to start B wee need to start C and D</p>
  
  <p>By fiddling a bit with Networkx I found that I can get that by doing a dfs traversal</p>
  
  <pre><code>print nx.dfs_successors(G,"A")
  {A:[H,B], H:[C], B:[D] }
  </code></pre>
  
  <p>But I have a problem with that method. As you can see when there is two same letter in the tree, Networkx only chose to put one of them in the final structure (which is correct) But I need to have the complete structure
  How can I force Networkx to add in the structure B:[D,C] ??</p>
  
  <p>I want to precise that by doing </p>
  
  <pre><code>&gt;&gt;&gt; nx.dfs_successors(G,"B")
  {'B': ['C', 'D']}
  </code></pre>
  
  <p>So everything is "Internally" correct, it's just the dfs_successors that displays it not in the way I wish.</p>
  
  <p>Thank you</p>