title: Where to put the Lhost and port number| python
body: <p>i have an assignment i have no perior knowledge to use argparse. pls help where to put the hostip and port number</p>
  
  <p><strong>Error:</strong></p>
  
  <pre><code>usage: server.py [-h] -a HOST -p PORT
  server.py: error: the following arguments are required: -a/--host, -p/--port
  </code></pre>
  
  <p><strong>piece of code</strong></p>
  
  <pre><code>import argparse, sys
  import signal
  from socket import *
  
  parser = argparse.ArgumentParser(description='Simple test')
  parser.add_argument('-a', '--host', help='set lhost', required=True)
  parser.add_argument('-p', '--port', help='set lport', required=True)
  args = vars(parser.parse_args())
  
  host = args['host']
  port = int(args['port'])
  print('\n\n\n')
  print('[+] SERVER IP:', host)
  print('[+] SERVER HOST:', port)
  </code></pre>