#NEWLINE# def pickup_port( ) : #NEWLINE# #INDENT# s = socket . socket ( ) #NEWLINE# s . bind ( ( '127.0.0.1' , 0 ) ) #NEWLINE# port = s . getsockname ( ) [ ( - 1 ) ] #NEWLINE# s . close ( ) #NEWLINE# return port