diff options
author | mike <michael.jmontcalm@gmail.com> | 2009-11-06 05:13:59 (GMT) |
---|---|---|
committer | mike <michael.jmontcalm@gmail.com> | 2009-11-06 05:13:59 (GMT) |
commit | 5491c551a2f88dbda852bc0e9d0c5406019e2be8 (patch) | |
tree | 94eeb2b16fc8b02d7df5ae46b7ae71a6463645bb /tutorius/properties.py | |
parent | 134d1333acc68ac2ccd3b0459df1be948500f1a7 (diff) |
LP 448319 : Add a resource translation layer for tutorial execution
Diffstat (limited to 'tutorius/properties.py')
-rw-r--r-- | tutorius/properties.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tutorius/properties.py b/tutorius/properties.py index ba3c211..c7af821 100644 --- a/tutorius/properties.py +++ b/tutorius/properties.py @@ -90,6 +90,21 @@ class TPropContainer(object): except AttributeError: return object.__setattr__(self, name, value) + def replace_property(self, prop_name, new_prop): + """ + Changes the content of a property. This is done in order to support + the insertion of executable properties in the place of a portable + property. The typical exemple is that a resource property needs to + be changed into a file property with the correct file name, since the + installation location will be different on every platform. + + @param prop_name The name of the property to be changed + @param new_prop The new property to insert + @raise AttributeError of the mentionned property doesn't exist + """ + props = object.__getattribute__(self, "_props") + props.__setitem__(prop_name, new_prop) + def get_properties(self): """ Return the list of property names. |