title: Python: How to use a third-party library
body: <p>I am feeling completely stupid. I am a Python beginner and would like to use third-party libraries, such as <a href="http://pythonhosted.org/dxfgrabber/" rel="nofollow">dxfgrabber</a>.</p>
  
  <p>I have played with the following, which is given in the help section, but I don't know further:</p>
  
  <pre><code>import dxfgrabber
  
  dxf = dxfgrabber.readfile("1.dxf")
  
  print("DXF version: {}".format(dxf.dxfversion))
  
  header_var_count = len(dxf.header) 
  
  layer_count = len(dxf.layers) 
  
  entity_count = len(dxf.entities) 
  
  print layer_count
  
  print entity_count
  
  print dxf.layers
  </code></pre>
  
  <p>output so far is:</p>
  
  <pre><code>DXF version: AC1009
  
  6
  
  2
  
  &lt;dxfgrabber.layers.LayerTable object at 0x10f42b590&gt;
  </code></pre>
  
  <p>my questions:</p>
  
  <ul>
  <li><p>So I know that there are 6 layers and 2 entities. How can I get further information like: layer name, which entities?</p></li>
  <li><p>How can I actually access the entities (for example I know that there are two lines)? How can I get the lines?</p></li>
  <li><p>I would like to write code so that the entities (such as lines) are displayed on a canvas.</p></li>
  </ul>
  
  <p>It seems like this library should be ready to use, but maybe for people with more knowledge about Python than me.</p>