All pastes #112489 Raw Edit

Unnamed

public text v1 · immutable
·published 2006-08-02 23:32 UTC
rendered paste body
connectip = raw_input("IP address of server to connect to (for default, type 'main'): ")

chooseport = input("Enter port number for connection (default is 5000): ")

if connectip == "main":

    mySocket = socket.socket ( socket.AF_INET, socket.SOCK_STREAM )

    mySocket.connect ( ( "24.126.92.199", "5000" ) )

else:

    mySocket = socket.socket ( socket.AF_INET, socket.SOCK_STREAM )

    mySocket.connect ( ( connectip, chooseport ) )