Skip to content

Commit 7a49a6b

Browse files
just a little clean up
1 parent 9184116 commit 7a49a6b

File tree

7 files changed

+27
-190
lines changed

7 files changed

+27
-190
lines changed

week-03/code/decorators/keyword_demo.ipynb

-168
This file was deleted.

week-06/code/numpy/super_test.ipynb renamed to week-06/code/super/super_test.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"metadata": {
3-
"name": "super_test"
3+
"name": ""
44
},
55
"nbformat": 3,
66
"nbformat_minor": 0,
@@ -41,7 +41,7 @@
4141
"language": "python",
4242
"metadata": {},
4343
"outputs": [],
44-
"prompt_number": 1
44+
"prompt_number": 2
4545
},
4646
{
4747
"cell_type": "code",
@@ -63,7 +63,7 @@
6363
]
6464
}
6565
],
66-
"prompt_number": 2
66+
"prompt_number": 3
6767
},
6868
{
6969
"cell_type": "code",

week-06/code/numpy/super_test2.ipynb renamed to week-06/code/super/super_test2.ipynb

+14-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"metadata": {
3-
"name": "super_test2"
3+
"name": ""
44
},
55
"nbformat": 3,
66
"nbformat_minor": 0,
@@ -37,7 +37,7 @@
3737
"language": "python",
3838
"metadata": {},
3939
"outputs": [],
40-
"prompt_number": 2
40+
"prompt_number": 1
4141
},
4242
{
4343
"cell_type": "code",
@@ -61,7 +61,7 @@
6161
]
6262
}
6363
],
64-
"prompt_number": 3
64+
"prompt_number": 2
6565
},
6666
{
6767
"cell_type": "markdown",
@@ -90,7 +90,7 @@
9090
"language": "python",
9191
"metadata": {},
9292
"outputs": [],
93-
"prompt_number": 5
93+
"prompt_number": 3
9494
},
9595
{
9696
"cell_type": "code",
@@ -111,7 +111,7 @@
111111
]
112112
}
113113
],
114-
"prompt_number": 6
114+
"prompt_number": 4
115115
},
116116
{
117117
"cell_type": "markdown",
@@ -145,7 +145,7 @@
145145
"language": "python",
146146
"metadata": {},
147147
"outputs": [],
148-
"prompt_number": 13
148+
"prompt_number": 5
149149
},
150150
{
151151
"cell_type": "code",
@@ -167,7 +167,7 @@
167167
]
168168
}
169169
],
170-
"prompt_number": 14
170+
"prompt_number": 6
171171
},
172172
{
173173
"cell_type": "code",
@@ -204,7 +204,7 @@
204204
"language": "python",
205205
"metadata": {},
206206
"outputs": [],
207-
"prompt_number": 15
207+
"prompt_number": 7
208208
},
209209
{
210210
"cell_type": "code",
@@ -225,25 +225,26 @@
225225
"in C.this\n",
226226
"in A.this\n",
227227
"<super: <class 'A'>, <C object>>\n",
228-
"<bound method C.this of <__main__.C object at 0x1c55ab0>>\n",
228+
"<bound method C.this of <__main__.C object at 0x102335810>>\n",
229229
"in B.this\n",
230230
"<super: <class 'B'>, <C object>>\n",
231-
"<bound method C.this of <__main__.C object at 0x1c55ab0>>\n",
231+
"<bound method C.this of <__main__.C object at 0x102335810>>\n",
232232
"in B.this\n",
233233
"<super: <class 'B'>, <C object>>\n",
234-
"<bound method C.this of <__main__.C object at 0x1c55ab0>>\n"
234+
"<bound method C.this of <__main__.C object at 0x102335810>>\n"
235235
]
236236
}
237237
],
238-
"prompt_number": 16
238+
"prompt_number": 8
239239
},
240240
{
241241
"cell_type": "code",
242242
"collapsed": false,
243243
"input": [],
244244
"language": "python",
245245
"metadata": {},
246-
"outputs": []
246+
"outputs": [],
247+
"prompt_number": 8
247248
}
248249
],
249250
"metadata": {}

week-09/code/basic_app_4.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,12 @@ def __init__(self, app_logic, *args, **kwargs):
7777
## add just a single button:
7878
self.theButton = wx.Button(self, label="Push Me")
7979
self.theButton.Bind(wx.EVT_BUTTON, self.onButton)
80-
80+
self.theButton.Bind(wx.EVT_LEFT_DOWN, self.onButton)
81+
82+
8183
def onButton(self, evt=None):
8284
print "You pushed the button!"
85+
evt.Skip()
8386

8487
def onClose(self, evt=None):
8588
print "close menu selected"

week-09/code/basic_app_5.py

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class ButtonPanel(wx.Panel):
4747
def __init__(self, *args, **kwargs):
4848
wx.Panel.__init__(self, *args, **kwargs)
4949

50+
#self.SetBackgroundColour(wx.Colour('red'))
5051
## add just a single button:
5152
self.theButton = wx.Button(self, label="Push Me")
5253
self.theButton.Bind(wx.EVT_BUTTON, self.onButton)

week-09/code/basic_app_6.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ def __init__(self, *args, **kwargs):
5757

5858
## do the layout
5959
## (try uncommenting the other, and see what happens...)
60-
S = wx.BoxSizer(wx.VERTICAL)
61-
#S = wx.BoxSizer(wx.HORIZONTAL)
60+
#S = wx.BoxSizer(wx.VERTICAL)
61+
S = wx.BoxSizer(wx.HORIZONTAL)
6262

63-
S.Add(theButton1, 0, wx.GROW | wx.ALL, 4)
64-
S.Add(theButton2, 0, wx.GROW | wx.ALL, 4)
63+
S.Add(theButton1, 1, wx.GROW | wx.ALL, 4)
64+
S.Add(theButton2, 2, wx.GROW | wx.ALL, 4)
6565

6666
self.SetSizerAndFit(S)
6767

week-09/code/basic_app_7.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def __init__(self, *args, **kwargs):
6363
## need another sizer to get the horizonal placement right:
6464
mainSizer = wx.BoxSizer(wx.HORIZONTAL)
6565
mainSizer.Add((1,1), 1) # stretchable space
66-
mainSizer.Add(buttonSizer, 0, wx.ALIGN_CENTER) # the sizer with the buttons in it
66+
mainSizer.Add(buttonSizer, 0, wx.ALIGN_LEFT) # the sizer with the buttons in it
6767
mainSizer.Add((1,1), 1) # stretchable space
6868

6969
self.SetSizer(mainSizer)

0 commit comments

Comments
 (0)