Convert "NaN" -> "nan" to catch up with Numpy 1.6
[hooke.git] / hooke / plugin / config.py
index ea1b0397f9d657ab84008cfab5e5ef87062612d5..2eefcb0304ba8e350320ebde805fc76203a4b9ea 100644 (file)
@@ -1,26 +1,26 @@
-# Copyright (C) 2010 W. Trevor King <wking@drexel.edu>
+# Copyright (C) 2010-2012 W. Trevor King <wking@tremily.us>
 #
 # This file is part of Hooke.
 #
-# Hooke is free software: you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
+# Hooke is free software: you can redistribute it and/or modify it under the
+# terms of the GNU Lesser General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
 #
-# Hooke is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
-# Public License for more details.
+# Hooke is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
+# details.
 #
-# You should have received a copy of the GNU Lesser General Public
-# License along with Hooke.  If not, see
-# <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU Lesser General Public License
+# along with Hooke.  If not, see <http://www.gnu.org/licenses/>.
 
 """The `config` module provides :class:`ConfigPlugin` and several
 associated :class:`hooke.command.Command`\s for handling
 :mod:`hooke.config` classes.
 """
 
+import os.path
 from StringIO import StringIO
 
 from ..command import Command, Argument, Failure
@@ -126,7 +126,7 @@ most local loaded config file.
         f = None
         try:
             if params['output'] != None:
-                f = open(params['output'], 'w')
+                f = open(os.path.expanduser(params['output']), 'w')
             hooke.config.write(fp=f)
         finally:
             if f != None: