Skip to content

Commit 51a0912

Browse files
committed
pushing session8 folder
1 parent 73c1ffb commit 51a0912

File tree

3 files changed

+690
-4
lines changed

3 files changed

+690
-4
lines changed

students/JohnRudolph/session7/html_render.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def append(self, content):
2828
else:
2929
#if string then use TextWrapper to create render class
3030
#needed so that render does not need to handle both strings/classes
31-
self.content.append(TextWrapper(content, self.tag))
31+
self.content.append(TextWrapper(content))
3232

3333
def render_tag(self, current_ind):
3434
# tag and then content for each class
@@ -61,7 +61,6 @@ class Html(Element):
6161
class Head(Element):
6262
tag = 'head'
6363

64-
6564
class Body(Element):
6665
tag = 'body'
6766

@@ -73,7 +72,7 @@ class A(Element):
7372
'''
7473
Creates a class for an anchor link element
7574
Need to render opening and closing tags differently
76-
Thank in parent element class
75+
Than in parent element class
7776
Also need a special wrapper to handle link text
7877
'''
7978
tag = 'a'
@@ -167,7 +166,7 @@ class TextWrapper:
167166
Only has to handle class objects
168167
"""
169168

170-
def __init__(self, text, indent):
169+
def __init__(self, text):
171170
self.text = text
172171

173172
#writes out text to file
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {
7+
"collapsed": true
8+
},
9+
"outputs": [],
10+
"source": []
11+
},
12+
{
13+
"cell_type": "code",
14+
"execution_count": null,
15+
"metadata": {
16+
"collapsed": true
17+
},
18+
"outputs": [],
19+
"source": []
20+
}
21+
],
22+
"metadata": {
23+
"kernelspec": {
24+
"display_name": "Python 3",
25+
"language": "python",
26+
"name": "python3"
27+
},
28+
"language_info": {
29+
"codemirror_mode": {
30+
"name": "ipython",
31+
"version": 3
32+
},
33+
"file_extension": ".py",
34+
"mimetype": "text/x-python",
35+
"name": "python",
36+
"nbconvert_exporter": "python",
37+
"pygments_lexer": "ipython3",
38+
"version": "3.4.3"
39+
}
40+
},
41+
"nbformat": 4,
42+
"nbformat_minor": 0
43+
}

0 commit comments

Comments
 (0)