Skip to content

Navigation Menu

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

Appearance settings

Commit db5a076

Browse filesBrowse files
try 27
1 parent 8fa8fec commit db5a076
Copy full SHA for db5a076

File tree

2 files changed

+33
-0
lines changed
Filter options

2 files changed

+33
-0
lines changed

‎27.py

Copy file name to clipboard
+33Lines 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

Copy file name to clipboard
68.6 KB
Loading

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.