最贊回答 / 慕粉1505143023
讀取文件的大小,如果size小于緩沖區的大小,則讀取緩沖區大小的數據,如果size大于緩沖區的大小,讀取size大小的數據,但不是完全的等于size的大小,一般讀取比size大的整行的數據
2017-01-09
fd = os.open( "foo.txt", os.O_RDWR|os.O_CREAT )
AttributeError: 'module' object has no attribute 'open' 這是為啥
AttributeError: 'module' object has no attribute 'open' 這是為啥
2017-01-09
請問一個問題:fp=open(self.logfile,'w') 這個不是會重置文件嗎?文件肯定空白了,self.cfg.write(fp)只能將修改的值寫入。源文件的應該消失?。繛槭裁醋詈笳{用cfg_dump()打印出來還存在源文件的內容信息?