Ein zukünftiger Entwickler wer ich wohl wegen dem Alter nicht mehr!
![Very Happy :D](./images/smilies/icon_biggrin.gif)
PS:
Komme aus dem Atari 800XL/C64 Zeitalter.
So wie ich das sehe ist es ziemlich trivial, einen neuen EndPoint zu erzeugen, wenn man nicht auf globale Variablen aufsetzt, was man ja eh nicht machen sollte.'connection' is a singleton instantiation of an EndPoint which will be connected to the server at the other end. It's a singleton because each client should only need one of these in most multiplayer scenarios. (If a client needs more than one connection to the server, a more complex architecture can be built out of instantiated EndPoint()s.)
Code: Alles auswählen
import os
import sys
import time
print("argv:", sys.argv)
time.sleep(1)
os.execv(sys.executable, [sys.executable, *sys.argv, "Extra-Argument"])