diff options
Diffstat (limited to 'lib/d2/util.py')
-rw-r--r-- | lib/d2/util.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/d2/util.py b/lib/d2/util.py new file mode 100644 index 0000000..139ddc4 --- /dev/null +++ b/lib/d2/util.py | |||
@@ -0,0 +1,8 @@ | |||
1 | import os | ||
2 | |||
3 | |||
4 | def expand_path(path): | ||
5 | """Expand the user and shell variables in a path | ||
6 | """ | ||
7 | path = os.path.expanduser(path) | ||
8 | return os.path.expandvars(path) | ||