Closed lzamparo closed 10 years ago
Using python 2.7.8 (default, Oct 18 2014, 12:50:18) [GCC 4.9.1],
I found that os.path.realpath() does not remove the '~' character if the path is specified as (e.g) '~/path/to/experiments/':
'/home/lee/~/projects/Spearmint/examples'
I suggest that os.path.realpath() should wrap os.path.expanduser(), as in the following example.
os.path.realpath(os.path.expanduser('~/projects/Spearmint/examples/')) '/home/lee/projects/Spearmint/examples' os.path.realpath(os.path.expanduser('~/projects/Spearmint/examples/'))
I'll create a PR
Ugh, markdown ate part of my first example:
os.path.realpath('~/projects/Spearmint/examples') returns '/home/lee/~/projects/Spearmint/examples'
Using python 2.7.8 (default, Oct 18 2014, 12:50:18) [GCC 4.9.1],
I found that os.path.realpath() does not remove the '~' character if the path is specified as (e.g) '~/path/to/experiments/':
I suggest that os.path.realpath() should wrap os.path.expanduser(), as in the following example.
I'll create a PR