envisage.resource.i_resource_protocol module

The interface for protocols that handle resource URLs.

class envisage.resource.i_resource_protocol.IResourceProtocol(adaptee, default=<class 'traits.adaptation.adaptation_error.AdaptationError'>)[source]

Bases: Interface

The interface for protocols that handle resource URLs.

file(address)[source]

Return a readable file-like object for the specified address.

Raise a ‘NoSuchResourceError’ if the resource does not exist.

e.g.:

protocol.file('acme.ui.workbench/preferences.ini')