六狼论坛's Archiver
首页
›
os
› os模块
xushaoxun
发表于 2013-1-28 19:44:45
os模块
#path in windows
a='d:/dev/cygwin'
b = os.path.normpath(a) #'d:\\dev\\cygwin'
#decide file mode
statinfo = os.stat(fullpath)
if statinfo.st_mode&stat.S_IEXEC:
print 'executable'
else:
print 'not executable'
页:
[1]
查看完整版本:
os模块