Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

compatibility.py 555B

123456789101112131415161718192021
  1. from __future__ import annotations
  2. try:
  3. from socket import create_server as socket_create_server
  4. except ImportError:
  5. import socket
  6. def socket_create_server(address, family=socket.AF_INET): # type: ignore
  7. """Simplified backport of socket.create_server from Python 3.8."""
  8. sock = socket.socket(family, socket.SOCK_STREAM)
  9. try:
  10. sock.bind(address)
  11. sock.listen()
  12. return sock
  13. except socket.error:
  14. sock.close()
  15. raise
  16. __all__ = ["socket_create_server"]