#NEWLINE# def opt_port( self , portstr ) : #NEWLINE# #INDENT# '\n        Specify the port number to listen on.\n        ' #NEWLINE# try : #NEWLINE# #INDENT# self [ 'port' ] = int ( portstr ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# raise UsageError ( 'Specify an integer between 0 and 65535 as a port number.' ) #NEWLINE# #UNINDENT# if ( self [ 'port' ] >= ( 2 ** 16 ) ) : #NEWLINE# #INDENT# raise UsageError ( 'Specify an integer between 0 and 65535 as a port number.' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self [ 'port' ] < 0 ) : #NEWLINE# #INDENT# raise UsageError ( 'Specify an integer between 0 and 65535 as a port number.' )