- if isinstance(self._persistent_vars, basestring):
- self._persistent_vars = (self._persistent_vars,)
- for varname in self._persistent_vars:
- self._load_var(varname)
-
- def _dump_var(self, varname):
- r"_dump_var() -> None :: Dump a especific variable to a pickle file."
- f = file(self._pickle_filename(varname), 'wb')
- pickle.dump(getattr(self, varname), f, 2)
+ if isinstance(self._persistent_attrs, basestring):
+ self._persistent_attrs = (self._persistent_attrs,)
+ for attrname in self._persistent_attrs:
+ self._load_attr(attrname)
+
+ def _dump_attr(self, attrname):
+ r"_dump_attr() -> None :: Dump a specific variable to a pickle file."
+ f = file(self._pickle_filename(attrname), 'wb')
+ pickle.dump(getattr(self, attrname), f, 2)