Skip to content

Commit 0e24c38

Browse files
author
Count Wilhelm
committed
first
1 parent 4b3e122 commit 0e24c38

228 files changed

Lines changed: 6141 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# rapidpythonprogramming
1+
# Rapid Python Programming

chapter10/app.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/python
2+
#app.py
3+
# Chapter 10 WxWidgets
4+
# Author: William C. Gunnells
5+
# Rapid Python Programming
6+
7+
# libs
8+
from PythonCard import model
9+
from bfile import *
10+
11+
class Minimal(model.Background):
12+
def on_bsubmit_mouseClick(self, event):
13+
namef = str(self.components.fname.text)
14+
namel = str(self.components.lname.text)
15+
self.components.stest.text=' '
16+
FileWrite(namef)
17+
FileWrite(namel)
18+
self.components.fname.text=' ' # clear text field
19+
self.components.lname.text=' ' # clear
20+
self.components.stest.visible=1
21+
self.components.stest.text=namef
22+
23+
if __name__ == '__main__':
24+
app = model.Application(Minimal)
25+
app.MainLoop()

chapter10/app.rsrc.py

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
{'application':{'type':'Application',
2+
'name':'Minimal',
3+
'backgrounds': [
4+
{'type':'Background',
5+
'name':'bgMin',
6+
'title':'Apartment Complex List',
7+
'size':(729, 639),
8+
9+
'menubar': {'type':'MenuBar',
10+
'menus': [
11+
{'type':'Menu',
12+
'name':'menuFile',
13+
'label':'File',
14+
'items': [
15+
{'type':'MenuItem',
16+
'name':'menuFileExit',
17+
'label':'E&xit\tAlt+X',
18+
'command':'exit',
19+
},
20+
]
21+
},
22+
]
23+
},
24+
'components': [
25+
26+
{'type':'StaticText',
27+
'name':'stest',
28+
'position':(318, 85),
29+
'text':'StaticText',
30+
'visible':False,
31+
},
32+
33+
{'type':'Button',
34+
'name':'bsubmit',
35+
'position':(120, 231),
36+
'label':'Submit',
37+
},
38+
39+
{'type':'StaticText',
40+
'name':'sroom',
41+
'position':(45, 189),
42+
'font':{'style': 'bold', 'faceName': u'Sans', 'family': 'sansSerif', 'size': 12},
43+
'text':'Room:',
44+
},
45+
46+
{'type':'TextField',
47+
'name':'room',
48+
'position':(120, 181),
49+
},
50+
51+
{'type':'StaticText',
52+
'name':'title',
53+
'position':(210, 13),
54+
'font':{'style': 'bold', 'faceName': u'Sans', 'family': 'sansSerif', 'size': 14},
55+
'text':'Apartement Complex Check in',
56+
},
57+
58+
{'type':'TextField',
59+
'name':'lname',
60+
'position':(120, 128),
61+
'size':(170, 31),
62+
},
63+
64+
{'type':'StaticText',
65+
'name':'slname',
66+
'position':(9, 140),
67+
'font':{'style': 'bold', 'faceName': u'Sans', 'family': 'sansSerif', 'size': 12},
68+
'text':'Lastname:',
69+
},
70+
71+
{'type':'StaticText',
72+
'name':'sfame',
73+
'position':(7, 85),
74+
'font':{'style': 'bold', 'faceName': u'Sans', 'family': 'sansSerif', 'size': 12},
75+
'text':'Firstname:',
76+
},
77+
78+
{'type':'TextField',
79+
'name':'fname',
80+
'position':(121, 78),
81+
'size':(170, 31),
82+
},
83+
84+
] # end components
85+
} # end background
86+
] # end backgrounds
87+
} }

chapter10/author.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Author: William C. Gunnells
2+
# Rapid Python Programming

chapter10/bfile.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/python
2+
# basic file write
3+
#bfile.py
4+
# Chapter 10 WxWidgets
5+
# Author: William C. Gunnells
6+
# Rapid Python Programming
7+
8+
9+
def FileWrite(d):
10+
f=open('file.txt','a')
11+
f.write(d)
12+
f.close()
13+
14+
if __name__=='__main__':
15+
d=raw_input("enter something: ")
16+
FileWrite(d)

chapter10/bfile.pyc

489 Bytes
Binary file not shown.

chapter10/ch.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Chapter 10 WxWidgets
2+

chapter10/fifthwx.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/python
2+
#fifth.py
3+
# Chapter 10 WxWidgets
4+
# Author: William C. Gunnells
5+
# Rapid Python Programming
6+
7+
# libs
8+
import wx
9+
10+
class Blah(wx.Frame):
11+
def __init__(self,x,y,z):
12+
wx.Frame.__init__(self,x,y,z)
13+
panel=wx.Panel(self)
14+
button=wx.Button(panel,label="press me")
15+
self.Bind(wx.EVT_BUTTON,self.closebutton,button)
16+
17+
def closebutton(self,event):
18+
self.Close(True)
19+
20+
app=wx.PySimpleApp()
21+
frame=Blah(x=None, y=-1,z="wow")
22+
frame.Show()
23+
app.MainLoop()
24+
25+

chapter10/file.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
hello world how are youWow this is cool
2+
asdffdfd

chapter10/firstwx.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/python
2+
#first.py
3+
# Chapter 10 WxWidgets
4+
# Author: William C. Gunnells
5+
# Rapid Python Programming
6+
7+
# libs
8+
import wx
9+
10+
app=wx.App()
11+
frame=wx.Frame(None, -1, 'first')
12+
frame.Show()
13+
app.MainLoop()
14+
15+

0 commit comments

Comments
 (0)