Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdb5a076

Browse files
try 27
1 parent8fa8fec commitdb5a076

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

‎27.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
importdownload_file
2+
importread_bin_file
3+
4+
fromPILimportImage
5+
6+
7+
defmain():
8+
url="http://www.pythonchallenge.com/pc/hex/zigzag.jpg"
9+
file_path="zigzag/zigzag.jpg"
10+
user="butter"
11+
password="fly"
12+
# first_step(url, file_path, user, password)
13+
# second_step(file_path)
14+
third_step(file_path)
15+
16+
17+
deffirst_step(url,file_path,user,password):
18+
download_file.download_with_auth(url,file_path,user,password)
19+
20+
21+
defsecond_step(file_path):
22+
ary=read_bin_file.read_bin_file(file_path)
23+
print(ary)
24+
25+
26+
defthird_step(file_path):
27+
im=Image.open(file_path)
28+
print(im)
29+
width,height=im.size
30+
31+
32+
if__name__=="__main__":
33+
main()

‎zigzag/zigzag.jpg

68.6 KB
Loading

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp