37,721
社区成员
发帖
与我相关
我的任务
分享
fobj = open('path', 'rb')
data = fobj.read()
在pythonwin下当文件过大时(达到200M以上),python无法正确执行,会报memory error 但是eclipse就可以正常执行print 'asd'
try:
print 'dsa'
up_file = open('e:\\e.zip',"rb")
data1 = up_file.read(31900)
data2 = up_file.read()
up_data = data1 + data2
#print up_data
print "open and read file successful"
except Exception,e:
print e
print "Open/Read file %s failed\n"
#return
up_file.close()
print 'asd'