Add os.path.expanduser() wrappers to user-supplied paths.
[hooke.git] / hooke / plugin / curve.py
index 3ef141ce0b14aa2d5d707f9108dccfd132c9e5cf..7f1190042f4898130cc6e0512f311cf27f9c24d3 100644 (file)
@@ -25,6 +25,7 @@ associated :class:`hooke.command.Command`\s for handling
 """
 
 import copy
+import os.path
 import re
 
 import numpy
@@ -459,7 +460,7 @@ True if you want the column-naming header line.
     def _run(self, hooke, inqueue, outqueue, params):
         data = self._block(hooke, params)
 
-        with open(params['output'], 'w') as f:
+        with open(os.path.expanduser(params['output']), 'w') as f:
             if params['header'] == True:
                 f.write('# %s \n' % ('\t'.join(data.info['columns'])))
             numpy.savetxt(f, data, delimiter='\t')