title: Draw simple shapes and save to file (pdf)
body: <p>I am looking for a python library that I can use to draw simple shapes and characters and then save to a file (in a format convertible to pdf). I would prefer if I did not need an X-server running.</p>
  
  <p>E.g. could look something like this</p>
  
  <pre><code>import drawing_lib
  obj = drawing_lib.Object()
  for i in range(5):
      obj.draw_line(from=(i*10, 20), to=(i*10+10, 35))
  obj.save_pdf('five_inclined_lines.pdf')
  </code></pre>
  
  <p>Any Ideas?</p>