05 2020 档案
摘要:os.path.isfile will return false if the argument is not a file: that is, it is a directory, or it does not exist. os.path.exists returns if it is a va
阅读全文
摘要:[item for item in os.listdir('/') if os.path.isdir(item)] 返回是空,这肯定是不对的,根目录下明明有很多目录的。 原来os.path.isdir检查的目录是在当前目录下的,而不是os.listdir清单('/')下的目录下,我的目录并没有切到/
阅读全文

浙公网安备 33010602011771号