pande
@pande1104
說
Mon, May 29, 2023 6:54 PM
[讀書學習] 《AIOT與OpenCV實戰應用(第三版):Python、樹莓派、物聯網與機器視覺》
第一篇 Python
1-7 檔案存取
. 1-7-1 開檔與開檔類型
. 1-7-2 讀檔
. 1-7-3 寫入
. 1-7-4 移動檔案指標
. 1-7-5 判斷檔案是否存在
. 1-7-6 目錄內容
[花絮] 回行符號\r、二進位開檔b
Raspberry_pi
Python
pande
@pande1104
說
Mon, May 29, 2023 7:00 PM
Tue, May 30, 2023 2:49 PM
[相關前置自學] 開檔open( , )
@pande1104 - [讀書學習] 《AIOT與OpenCV實戰應用(第三版):Python、樹莓派...
@pande1104 - [讀書學習] 《AIOT與OpenCV實戰應用(第三版):Python、樹莓派...
文字全形半形
pande
@pande1104
說
Mon, May 29, 2023 7:05 PM
Mon, May 29, 2023 7:16 PM
[本章基礎-新學]
開檔之後必要的
.close()
可以改用「開-關檔」區段語法
with open( , ) as f:
避免「開檔之後忘記關檔」情況
寫入之後必要
.flush()
pande
@pande1104
說
Mon, May 29, 2023 7:07 PM
[回行符號\r]
http://mirror.sars.tw/...
【轉貼】\r\n和\n的差異 @ seacatcry的部落格 :: 痞客邦 ::
回車
pande
@pande1104
說
Mon, May 29, 2023 7:12 PM
Mon, May 29, 2023 7:12 PM
[二進位開檔b]
可以使用.seek( , )指標功能了,但…
§ 如何讀取文字?
.read().decode('utf-8')
§ 如何寫入文字?
在 Python 中將字串轉換為二進位制
bytearray(string, "utf-8") 等 方法
pande
@pande1104
說
Mon, May 29, 2023 7:15 PM
.seek(a , b)
檔案的指標操作
a: 位移量
b: 0-頭/1-當前/2-尾
載入新的回覆
第一篇 Python
1-7 檔案存取
. 1-7-1 開檔與開檔類型
. 1-7-2 讀檔
. 1-7-3 寫入
. 1-7-4 移動檔案指標
. 1-7-5 判斷檔案是否存在
. 1-7-6 目錄內容
[花絮] 回行符號\r、二進位開檔b
Raspberry_pi Python
開檔之後必要的
.close()
可以改用「開-關檔」區段語法
with open( , ) as f:
避免「開檔之後忘記關檔」情況
寫入之後必要
.flush()
http://mirror.sars.tw/...
【轉貼】\r\n和\n的差異 @ seacatcry的部落格 :: 痞客邦 ::
回車
可以使用.seek( , )指標功能了,但…
§ 如何讀取文字?
.read().decode('utf-8')
§ 如何寫入文字?
檔案的指標操作
a: 位移量
b: 0-頭/1-當前/2-尾