Ignore:
Timestamp:
09/01/13 16:46:05 (8 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
Phase:
public
Message:

Add .get_file() to resources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/resources.py

    r39 r54  
    3939            yield (module, path_fragments)
    4040
     41    def get_file(self, *path_fragments, **kw):
     42        mode = kw.get('mode', "rU")
     43        path = self.get_resource_path(*path_fragments)
     44        return file(path, mode)
     45
    4146    def get_image(self, *name_fragments, **kw):
    4247        transforms = kw.get('transforms', ())
Note: See TracChangeset for help on using the changeset viewer.