当前位置:主页 > 软件编程 > Python代码 >
时间:2021-06-03 09:10:10 | 栏目:Python代码 | 点击:次
如下所示:
import os if os.path.isdir(path): print "it's a directory" elif os.path.isfile(path): print "it's a normal file" else: print "it's a special file(socket,FIFO,device file)"