Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用嵌入式方法(例如,shutil.copy2)或仅运行shell命令(os.system())以编程方式使用python从旧CD复制文件。操作系统是 Ubuntu。当程序到达无法复制的文件时,程序会挂起(似乎一直在尝试)。我怀疑这不仅仅是一个python问题。
有没有办法从 Python 内部监控复制过程,如果时间太长就终止它?谢谢