April 21st, 2013, 05:16 PM
Problem finding "abspath" of files
I have been using
os.path.abspath("file name.txt") in order to be able to open files.
This gives me the wrong path because it leads to where the .py scripts reside. Using this abspath I am unable to open the files-for good reasons. I tried to change the directory to where the file is located-but that did not help.
(Python 3.2 on Mac OS X 10.6.8)
April 21st, 2013, 09:21 PM
If you know where a file is you should be able to (attempt to) open it. Have you yet tried
Comments on this post
[/code] are essential for python code and Makefiles!