Message170514
| Author |
cmikula |
| Recipients |
cmikula |
| Date |
2012年09月15日.12:57:39 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1347713860.36.0.872797660614.issue15946@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
OS Windows 8 Enterprise x64 clean installed.
Python Version 2.6.6 and 2.7.3 both x64 installed.
Problem is to delete one Directory and immediately after create one new with the same Name!
!!! Code !!!
import sys, platform, os, shutil
TEST_PATH = "/test"
print "platform:\t", platform.platform()
print "sys.platform:\t", sys.platform
print "sys.version:\t", sys.version
print "directory test:\t'%s'" % TEST_PATH
print
if os.path.exists(TEST_PATH):
shutil.rmtree(TEST_PATH)
if not os.path.exists(TEST_PATH):
os.makedirs(TEST_PATH)
print "success"
!!! End of code !!!
The error is only present if the Directory was deleted previously.
Error:
Traceback (most recent call last):
File "dir_test.py", line 23, in <module>
os.makedirs(BUILD_PATH)
File "C:\Program Files\Python27\lib\os.py", line 157, in makedirs
mkdir(name, mode)
WindowsError: [Error 5] Zugriff verweigert: '/test' |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年09月15日 12:57:40 | cmikula | set | recipients:
+ cmikula |
| 2012年09月15日 12:57:40 | cmikula | set | messageid: <1347713860.36.0.872797660614.issue15946@psf.upfronthosting.co.za> |
| 2012年09月15日 12:57:39 | cmikula | link | issue15946 messages |
| 2012年09月15日 12:57:39 | cmikula | create |
|