diff --git a/compiled_starters/python/app/main.py b/compiled_starters/python/app/main.py index 7b9c1a4..f34f389 100644 --- a/compiled_starters/python/app/main.py +++ b/compiled_starters/python/app/main.py @@ -2,13 +2,14 @@ def main(): - # You can use print statements as follows for debugging, they'll be visible when running tests. + # You can use print statements as follows for debugging, + # they'll be visible when running tests. print("Logs from your program will appear here!") # Uncomment this to pass the first stage # - # server_socket = socket.create_server(("localhost", 9092), reuse_port=True) - # server_socket.accept() # wait for client + # server = socket.create_server(("localhost", 9092), reuse_port=True) + # server.accept() # wait for client if __name__ == "__main__": diff --git a/solutions/python/01-vi6/code/app/main.py b/solutions/python/01-vi6/code/app/main.py index 5d6bb67..ca17c13 100644 --- a/solutions/python/01-vi6/code/app/main.py +++ b/solutions/python/01-vi6/code/app/main.py @@ -2,8 +2,10 @@ def main(): - server_socket = socket.create_server(("localhost", 9092), reuse_port=True) - server_socket.accept() # wait for client + print("Logs from your program will appear here!") + + server = socket.create_server(("localhost", 9092), reuse_port=True) + server.accept() # wait for client if __name__ == "__main__": diff --git a/solutions/python/01-vi6/diff/app/main.py.diff b/solutions/python/01-vi6/diff/app/main.py.diff index f176cb7..2a8cae3 100644 --- a/solutions/python/01-vi6/diff/app/main.py.diff +++ b/solutions/python/01-vi6/diff/app/main.py.diff @@ -1,17 +1,18 @@ -@@ -1,15 +1,10 @@ +@@ -1,16 +1,12 @@ import socket # noqa: F401 def main(): -- # You can use print statements as follows for debugging, they'll be visible when running tests. -- print("Logs from your program will appear here!") -- +- # You can use print statements as follows for debugging, +- # they'll be visible when running tests. + print("Logs from your program will appear here!") + - # Uncomment this to pass the first stage - # -- # server_socket = socket.create_server(("localhost", 9092), reuse_port=True) -- # server_socket.accept() # wait for client -+ server_socket = socket.create_server(("localhost", 9092), reuse_port=True) -+ server_socket.accept() # wait for client +- # server = socket.create_server(("localhost", 9092), reuse_port=True) +- # server.accept() # wait for client ++ server = socket.create_server(("localhost", 9092), reuse_port=True) ++ server.accept() # wait for client if __name__ == "__main__": diff --git a/solutions/python/01-vi6/explanation.md b/solutions/python/01-vi6/explanation.md index 54b8baf..7c2f890 100644 --- a/solutions/python/01-vi6/explanation.md +++ b/solutions/python/01-vi6/explanation.md @@ -5,8 +5,8 @@ Study and uncomment the relevant code: ```python # Uncomment this to pass the first stage -server_socket = socket.create_server(("localhost", 9092), reuse_port=True) -server_socket.accept() # wait for client +server = socket.create_server(("localhost", 9092), reuse_port=True) +server.accept() # wait for client ``` Push your changes to pass the first stage: