I have (in the main) the following code:
status = raw_input("Host? (Y/N) ")
if status=="Y":
print("host")
serverprozess = Process(target= spawn_server)
serverprozess.start()
clientprozess = Process (target = spawn_client)
clientprozess.start()
The methods called above basically do as follows:
def spawn_server():
mserver = server.Gameserver()
#a process for the host. spawned if and only if the player acts as host
def spawn_client():
myClient = client.Client()
#and a process for the client. this is spawned regardless of the player's status
It works fine, the server spawns and so does the client.
Only yesterday I added in client.Client() the following line:
self.ip = raw_input("IP-Adress: ")
The second raw_input throws an EOF -exception:
ret = original_raw_input(prompt)
EOFError: EOF when reading a line
Is there a way to fix this? Can I not use more than one prompt?