Add os.path.expanduser() wrappers to user-supplied paths.
[hooke.git] / hooke / plugin / playlist.py
index 616cfed6739c52ff73627cd0aff6ffc97cb19973..6dced289e376d6642489d568dcca4963820809bd 100644 (file)
@@ -247,7 +247,8 @@ created from scratch with 'new playlist'), this option is required.
             help=self.__doc__, plugin=plugin)
 
     def _run(self, hooke, inqueue, outqueue, params):
-       self._playlist(hooke, params).save(params['output'])
+       self._playlist(hooke, params).save(
+            os.path.expanduser(params['output']))
 
 
 class LoadCommand (PlaylistAddingCommand):
@@ -270,7 +271,8 @@ Drivers for loading curves.
             help=self.__doc__, plugin=plugin)
 
     def _run(self, hooke, inqueue, outqueue, params):
-        p = load(path=params['input'], drivers=params['drivers'], hooke=hooke)
+        p = load(os.path.expanduser(path=params['input']),
+                 drivers=params['drivers'], hooke=hooke)
         self._set_playlist(hooke, params, p)
        outqueue.put(p)
 
@@ -295,7 +297,7 @@ Additional information for the input :class:`hooke.curve.Curve`.
 
     def _run(self, hooke, inqueue, outqueue, params):
         self._playlist(hooke, params).append_curve_by_path(
-            params['input'], params['info'], hooke=hooke)
+            os.path.expanduser(params['input']), params['info'], hooke=hooke)
 
 
 class AddGlobCommand (PlaylistCommand):