title: Pros and cons of 'script' vs. 'entry_point' in Python command line scripts
body: <p>Python's <a href="https://pypi.python.org/pypi/setuptools" rel="noreferrer">setuptool</a> has two ways of adding command line scripts to a Python package: <code>script</code> and <code>entry_point</code>.</p>
  
  <p><a href="http://www.scotttorborg.com/python-packaging/command-line-scripts.html" rel="noreferrer">This tutorial</a> outlines these ways:</p>
  
  <h2><code>scripts</code></h2>
  
  <p>Add a Python script (<code>funniest-joke</code>) to the package tree, and add its path to <code>setup.py</code>:</p>
  
  <pre><code>setup(
      ...
      scripts=['bin/funniest-joke'],
      ...
  )
  </code></pre>
  
  <h2>Entry point:</h2>
  
  <p>Add a Python script (<code>funniest-joke</code>) to the package tree. Add a <code>main()</code> function to it, and add <code>command_line.py</code> submodule which runs funniest's <code>main()</code>:</p>
  
  <h3><code>command_line.py</code>:</h3>
  
  <pre><code>import funniest
  
  def main():
      print funniest.joke()
  </code></pre>
  
  <h3><code>setup.py</code></h3>
  
  <pre><code>setup(
      ...
      entry_points = {
          'console_scripts': ['funniest-joke=funniest.command_line:main'],
      }
      ...
  )
  </code></pre>
  
  <p>What are the advantages and disadvantages of each method?</p>