title: Passing arguments to an entry point python script using argparser
body: <p>I am looking to pass a user entered arguments from the command line to an entry point for a python script. Thus  far I have tried to used argparse to pass the arguments  from the command line to the test.py script.  When I try to pass the arguments they are not recognised and I recieve the following error. </p>
  
  <blockquote>
    <p>load_entry_point('thesaurus==0.1', 'console_scripts', 'thesaurus')()<br>
    TypeError: find_synonym() missing 1 required positional argument: 'argv'</p>
  </blockquote>
  
  <p>I have looked at other examples on here but have not been able to get any of the solutions to work.</p>
  
  <pre><code>def main(argv):
      if argv is None:
          argv = sys.argv
  
      parser = argparse.ArgumentParser(description='Enter string')
      parser.add_argument('string', type=str, help='Enter word or words', nargs='*')
      args = parser.parse_args(argv[1:])
      print(args)
  
  if __name__ == "__main__":
      sys.exit(main(sys.argv))
  </code></pre>
  
  <p>My setup.py script entry point looks like the following</p>
  
  <pre><code>setup(entry_points={'console_scripts': ['test=test_folder.main:main']})
  </code></pre>
  
  <p>What I expect to happen is similar to when I run python main.py main foo. Which will successfully print out hello when it is passes to the function.</p>