location Function

Defined in pyglet.resource

location(self, name)

Get the location of a resource.

This method is useful for opening files referenced from a resource. For example, an HTML file loaded as a resource might reference some images. These images should be located relative to the HTML file, not looked up individually in the loader’s path.

Parameters:name (str) – Filename of the resource to locate.
Return type:Location

Previous topic

image Function

Next topic

media Function