title: Python: format string as table in non-monospace font
body: <p>I'm working on a Slack Webhooks integration with Slack <a href="https://api.slack.com/slash-commands" rel="nofollow noreferrer">Slash commands</a>. My script flow is as following:</p>
  <ol>
  <li>Getting a slash command request from a Slack.</li>
  <li>Processing the data (in a form of dict or Pandas DataFrame)</li>
  <li>Posting back to the channel using the Slack webhook.</li>
  </ol>
  <p>My response is a set of key:value records or two columns dataframe. I want to print them nicely into Slack, however I ran into a formatting problem.</p>
  <ol>
  <li><p>Using Slack back-ticks to make a code block with monospace font would not work, because I might have very large records, and Slack trims the string after 8000 characters.</p>
  </li>
  <li><p>Printing the lines without monospace, as a plain text, results in an ugly columns with different width in each row.</p>
  </li>
  </ol>
  <p>I tried all sorts of formatting tricks, but could not find a good way to format a response using the Slack API as two very long columns. I guess I am looking for a good library that would format a string for me given the font being used.</p>
  <p>Any help would be appreciated.</p>