Skip to content

Commit db5a076

Browse files
try 27
1 parent 8fa8fec commit db5a076

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+
import download_file
2+
import read_bin_file
3+
4+
from PIL import Image
5+
6+
7+
def main():
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+
def first_step(url, file_path, user, password):
18+
download_file.download_with_auth(url, file_path, user, password)
19+
20+
21+
def second_step(file_path):
22+
ary = read_bin_file.read_bin_file(file_path)
23+
print(ary)
24+
25+
26+
def third_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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy