8000 Cleaned · rubenhortas/python_challenge@fbd97fe · GitHub
[go: up one dir, main page]

Skip to content

Commit fbd97fe

Browse files
committed
Cleaned
1 parent 8648289 commit fbd97fe

File tree

3 files changed

+5
-33
lines changed

3 files changed

+5
-33
lines changed

06.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22
# _*_ coding:utf-8 _*
33

44
# http://www.pythonchallenge.com/pc/def/channel.html
5-
65
import signal
7-
from zipfile import ZipFile
86

7+
from zipfile import ZipFile
98
from handlers.python import exit_signal_handler
109

11-
1210
def get_next_file(i, zf, file_name, result):
13-
isLast = True
11+
is_last = True
1412

1513
try:
1614
file_words = zf.read(file_name).split()
@@ -21,11 +19,11 @@ def get_next_file(i, zf, file_name, result):
2119

2220
for word in file_words:
2321
if word.isdigit():
24-
isLast = False
22+
is_last = False
2523
next_file = '{0}.txt'.format(word)
2624
get_next_file(i+1, zf, next_file, result)
2725

28-
if isLast:
26+
if is_last:
2927
print result
3028

3129
except Exception as e:

handlers/python.py

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,6 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python2
22
# _*_ coding:utf-8 _*
33

4-
"""
5-
@author: Rubén Hortas Astariz <http://rubenhortas.blogspot.com>
6-
@contact: rubenhortas at gmail.com
7-
@github: http://github.com/rubenhortas
8-
@license: CC BY-NC-SA 3.0 <http://creativecommons.org/licenses/by-nc-sa/3.0/>
9-
@file: python
10-
"""
11-
12-
134
# noinspection PyUnusedLocal
145
def exit_signal_handler(signal, frame):
15-
""""
16-
exit_signal_handler(signal, frame)
17-
Handles an exit signal.
18-
Arguments:
19-
signal: (int) number of signal.
20-
frame: (string) name of the signal handler.
21-
"""
22-
236
exit(0)

handlers/url.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
#!/usr/bin/env python
22
# _*_ coding:utf-8 _*
33

4-
"""
5-
@author: Rubén Hortas Astariz <http://rubenhortas.blogspot.com>
6-
@contact: rubenhortas at gmail.com
7-
@github: http://github.com/rubenhortas
8-
@license: CC BY-NC-SA 3.0 <http://creativecommons.org/licenses/by-nc-sa/3.0/>
9-
@file: url
10-
"""
11-
12-
134
def print_html(html):
145
print 50 * '-'
156
print html

0 commit comments

Comments
 (0)
0