def get_file_dependencies(f, stdout=sys.stdout, stderr=sys.stderr, rospack=None):
 package = rospkg.get_package_name(f)
 spec = None
 if f.endswith(roslib.msgs.EXT):
  (_, spec) = roslib.msgs.load_from_file(f)
 elif f.endswith(roslib.srvs.EXT):
  (_, spec) = roslib.srvs.load_from_file(f)
 else:
  raise Exception(('[%s] does not appear to be a message or service' % spec))
 return get_dependencies(spec, package, stdout, stderr, rospack=rospack)

def get_file_dependencies ( f , stdout = sys . stdout , stderr = sys . stderr , rospack = None ) : package = rospkg . get_package_name ( f ) spec = None if f . endswith ( roslib . msgs . EXT ) : ( _ , spec ) = roslib . msgs . load_from_file ( f ) elif f . endswith ( roslib . srvs . EXT ) : ( _ , spec ) = roslib . srvs . load_from_file ( f ) else : raise Exception ( ( '[%s] does not appear to be a message or service' % spec ) ) return get_dependencies ( spec , package , stdout , stderr , rospack = rospack )
compute dependencies of the specified message/service file .