Python – 有没有办法等待os.unlink()或os.remove()完成?

Python – 有没有办法等待os.unlink()或os.remove()完成?

我有以下代码: os.remove(_Temp_Dir_main + str(i) + .exe)os.rmdir(_Temp_Dir_) 这给了我: OSError: [WinError 145] Directory is not empty: _Temp_Dir_ 如果我把线 time.sleep(0.05) 在os.rmdir()之前,它可以正常工作.我认为os.remo

联系我们

联系我们

0577-28828765

在线咨询: QQ交谈

邮箱: xwei067@foxmail.com

工作时间:周一至周五,9:00-17:30,节假日休息

返回顶部