def _ParsePort(port, description):
 try:
  port = int(port)
  if (not (65535 > port > 0)):
   raise ValueError
  return port
 except ValueError:
  print >>sys.stderr, ('Invalid value %s supplied for %s' % (port, description))
  PrintUsageExit(1)

def _ParsePort ( port , description ) : try : port = int ( port ) if ( not ( 65535 > port > 0 ) ) : raise ValueError return port except ValueError : print >> sys . stderr , ( 'Invalid value %s supplied for %s' % ( port , description ) ) PrintUsageExit ( 1 )
parses a port number from a string .