在Python上打开AIX.4g2.I文件时出错:
>>> fd = open('/mnt/t/MY_BIG_4GB_FILE', 'r')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IOError: [Errno 127] Value too large to be stored in data type: '/mnt/t/MY_BIG_4GB_FILE'
有什么解决办法吗?我没有在谷歌上找到信息。在
编辑: 为了阅读大文件,我做了一些事情(我知道这是垃圾,但有时您根本无法更改python版本):
^{pr2}$
你要找的是“大文件支持”。这里有一个不错的简介:http://docs.python.org/2/library/posix.html#large-file-support。您可能需要使用适当的选项重新编译Python解释器,或者找到具有这些选项的预构建解释器。如果可以的话,可以尝试构建Python2.7版本。在
相关问题 更多 >
编程相关推荐