Add _clear_class and _backed_subclasses to PackageConfig.
authorW. Trevor King <wking@drexel.edu>
Thu, 28 Jul 2011 17:48:20 +0000 (13:48 -0400)
committerW. Trevor King <wking@drexel.edu>
Thu, 28 Jul 2011 17:48:20 +0000 (13:48 -0400)
pypiezo/config.py

index 791c2e8d256dfced2c32b04afe446f72dc44cea1..3f7bba863116a90cb6ec8a5f178e5721d6c7815c 100644 (file)
@@ -34,6 +34,9 @@ class PackageConfig (_h5config_tools.PackageConfig):
         ]
 
 
+PackageConfig._clear_class = PackageConfig
+
+
 class AxisConfig (_config.Config):
     "Configure a single piezo axis"
     settings = [
@@ -105,3 +108,8 @@ class InputChannelConfig (ChannelConfig):
 
 
 _util.build_backend_classes(_sys.modules[__name__])
+
+PackageConfig._backed_subclasses = [
+    ('.h5', HDF5_PackageConfig),
+    ('.yaml', YAML_PackageConfig)
+    ]