title: How to find out the binded address and port of a running server progress written in python?
body: <p>Except from source code, I tried <code>$ netstat</code> and found nothing about the <code>server.py</code> app I was just running.</p>
  
  <p>My app is here:</p>
  
  <pre><code>import socket
  from server_const import const
  
  def server(port=1060):
      sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
      sock.bind(("127.0.0.1", port))
      print("The server is listening at {}".format(sock.getsockname()))
      while True:
          data, address = sock.recvfrom(const.MAX_BYTES.value)
          text = data.decode("utf-8")
          print("The client at {} says {!r}".format(address, text))
          text = "Your data was {} bytes long".format(len(data))
          data = text.encode("utf-8")
          sock.sendto(data, address)
  </code></pre>
  
  <p>I run my app in terminal and press <code>ctrl+z</code> to suspend the process, how can I find the binded address and port from my terminal?</p>