Converted from SourceForge issue 3477666, submitted by ceball
Submit Date: 2012-01-23 10:48 GMT
I was surprised to find that param.resolve_path() doesn't work with "~" on linux:
[cortex]v1cball: touch ~/testing123
[cortex]v1cball: python
Python 2.6.6 (r266:84292, May 20 2011, 16:42:11)
[GCC 4.4.5 20110214 (Red Hat 4.4.5-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import param
param.resolve_path("~/testing123")
Traceback (most recent call last):
File "", line 1, in
File "param/parameterized.py", line 1789, in new
return inst.call(*args,**params)
File "param/init.py", line 898, in call
raise IOError(os.path.split(path)[1] + " was not found in the following place(s): " + str(paths_tried) + ".")
IOError: testing123 was not found in the following place(s): ['/disk/scratch/s0454615/topographica-dice/~/testing123'].
Maybe that's ok, I'm not sure. Feel free to close this.
Converted from SourceForge issue 3477666, submitted by ceball Submit Date: 2012-01-23 10:48 GMT
I was surprised to find that param.resolve_path() doesn't work with "~" on linux:
[cortex]v1cball: touch ~/testing123 [cortex]v1cball: python Python 2.6.6 (r266:84292, May 20 2011, 16:42:11) [GCC 4.4.5 20110214 (Red Hat 4.4.5-6)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
Maybe that's ok, I'm not sure. Feel free to close this.
Python has os.path.expanduser() to deal with "~":