Message174561
The problem is not file permissions nor the install. I did some further testing.
The problem actually occurs with the library calls at lines 23 and 25. I changed these lines to eliminate the library call by just hard coding the file path.
Change from:
line 23: header_path = libastyle.get_astyle_directory() + "/src/astyle.h"
line 25: beautifier_path = libastyle.get_astyle_directory() + "/src/ASBeautifier.cpp"
Change to:
line 23: header_path = "C:\\Users\\jimp\\ZPythonPermissionError\\Projects/AStyle/src/astyle.h"
line 25: beautifier_path = "C:\\Users\\jimp\\ZPythonPermissionError\\Projects/AStyle/src/ASBeautifier.cpp"
When run with the changes the program worked. The problem is apparently with the library call, not the file itself.
Then I changed the same instructions to get the file name using the same instructions that the library program used. The library program uses “sys.path[0]” to get the directory containing the executed script.
Change to:
line 23: header_path = sys.path[0] + "/../AStyle/src/astyle.h"
line 25: beautifier_path = sys.path[0] + "/../AStyle/src/ASBeautifier.cpp"
This also worked.
I want to do some more testing this weekend. I will hopefully have more info on Monday. Thanks for your input on this.
Apparently this is not a problem on your PC. I have run this on both Windows 7 and Windows 8. I get the same results (a Permission Error) on both. |
|
Date |
User |
Action |
Args |
2012-11-02 19:44:15 | jimp02 | set | recipients:
+ jimp02, r.david.murray |
2012-11-02 19:44:15 | jimp02 | set | messageid: <1351885455.45.0.0634561471243.issue16383@psf.upfronthosting.co.za> |
2012-11-02 19:44:15 | jimp02 | link | issue16383 messages |
2012-11-02 19:44:15 | jimp02 | create | |
|