old_contents: #!/usr/bin/env python2
  """
  Minimal Example
  ===============
  Generating a square wordcloud from the US constitution using default arguments.
  """
  
  from os import path
  import matplotlib.pyplot as plt
  from wordcloud import WordCloud
  
  d = path.dirname(__file__)
  
  # Read the whole text.
  text = open(path.join(d, 'constitution.txt')).read()
  wordcloud = WordCloud().generate(text)
  # Open a plot of the generated image.
  plt.imshow(wordcloud)
  plt.axis("off")
  
  # take relative word frequencies into account, lower max_font_size
  wordcloud = WordCloud(max_font_size=40, relative_scaling=.5).generate(text)
  plt.figure()
  plt.imshow(wordcloud)
  plt.axis("off")
  plt.show()
  
new_contents: #!/usr/bin/env python2
  """
  Minimal Example
  ===============
  Generating a square wordcloud from the US constitution using default arguments.
  """
  
  from os import path
  from wordcloud import WordCloud
  
  d = path.dirname(__file__)
  
  # Read the whole text.
  text = open(path.join(d, 'constitution.txt')).read()
  
  # Generate a word cloud image
  wordcloud = WordCloud().generate(text)
  
  # Display the generated image:
  # the matplotlib way:
  import matplotlib.pyplot as plt
  plt.imshow(wordcloud)
  plt.axis("off")
  
  # take relative word frequencies into account, lower max_font_size
  wordcloud = WordCloud(max_font_size=40, relative_scaling=.5).generate(text)
  plt.figure()
  plt.imshow(wordcloud)
  plt.axis("off")
  plt.show()
  
  # The pil way (if you don't have matplotlib)
  #image = wordcloud.to_image()
  #image.show()
  
subject: add the "pil way" of showing an image to the simple.py