From c53fe63504320ec0bae6ca92c2c2aa687ba6d743 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 31 Jul 2010 15:23:55 -0400 Subject: [PATCH] Make hooke.config.HookeConfigParser's options case sensitive (vs. all lowercase) --- hooke/config.py | 9 +++++++++ hooke/ui/gui/panel/plot.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/hooke/config.py b/hooke/config.py index 57756a0..97d645b 100644 --- a/hooke/config.py +++ b/hooke/config.py @@ -258,6 +258,15 @@ class HookeConfigParser (configparser.RawConfigParser): if local_fp: fp.close() + def optionxform(self, option): + """ + + Overrides lowercasing behaviour of + :meth:`ConfigParser.RawConfigParser.optionxform`. + """ + return option + + class TestHookeConfigParser (unittest.TestCase): def test_queue_safe(self): """Ensure :class:`HookeConfigParser` is Queue-safe. diff --git a/hooke/ui/gui/panel/plot.py b/hooke/ui/gui/panel/plot.py index c8e0dc2..d1d5a9d 100644 --- a/hooke/ui/gui/panel/plot.py +++ b/hooke/ui/gui/panel/plot.py @@ -159,7 +159,7 @@ class PlotPanel (Panel, wx.Panel): fontsize=12) axes = self._c['figure'].add_subplot(1, 1, 1) - if config['plot si format'] == 'True': # TODO: config should convert + if config['plot SI format'] == 'True': # TODO: config should convert d = int(config['plot decimals']) # TODO: config should convert x_n, x_unit = split_data_label(x_name) y_n, y_unit = split_data_label(y_name) -- 2.26.2