IOerror的所有“原因”是什么?

时间:2013-04-23 21:18:33

标签: python exception-handling io

来自Python文档

  

异常IOError

Raised when an I/O operation (such as a print statement, the built-in open() function or a method of a file object) fails for an
I/O-related reason, e.g., “file not found” or “disk full”.

互联网上似乎没有列举原因的列举。

IOErrors似乎是放置关于io的例外,没有其他地方可以居住。 我很好奇IOErrors的所有内容(至少是所有常见原因)。

让我们假设访问像环境这样的文件(具有文件概念的文件系统)。 其上有限的空间(10千兆字节的硬盘(磁介质))。

这个问题不是特定于python的,但我需要一个起点。

1 个答案:

答案 0 :(得分:0)

Python不会生成I / O错误,它们来自操作系统。 Python只是鹦鹉从操作系统传递的错误消息。