Skip to content

Commit 468e24b

Browse files
committed
Create ch12.6 copy binary.py
1 parent f30c899 commit 468e24b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# coding=utf-8
2+
3+
f_name='logo.png'
4+
5+
with open(f_name,'r') as f:
6+
b=f.read()
7+
copy_f_name='logo2.png'
8+
with open(copy_f_name,'wb') as copy_binary:
9+
copy_binary.write(b)
10+
11+
12+
13+
14+
15+
16+
17+
18+
19+

0 commit comments

Comments
 (0)