def load_by_type(msgtype, package_context=''):
 (pkg, basetype) = roslib.names.package_resource_name(msgtype)
 pkg = (pkg or package_context)
 try:
  m_f = msg_file(pkg, basetype)
 except roslib.packages.InvalidROSPkgException:
  raise MsgSpecException(('Cannot locate message type [%s], package [%s] does not exist' % (msgtype, pkg)))
 return load_from_file(m_f, pkg)

def load_by_type ( msgtype , package_context = '' ) : ( pkg , basetype ) = roslib . names . package_resource_name ( msgtype ) pkg = ( pkg or package_context ) try : m_f = msg_file ( pkg , basetype ) except roslib . packages . InvalidROSPkgException : raise MsgSpecException ( ( 'Cannot locate message type [%s], package [%s] does not exist' % ( msgtype , pkg ) ) ) return load_from_file ( m_f , pkg )
load message specification for specified type .