Skip to content

Commit acbad37

Browse files
committed
Merge branch 'Metallicow-Classic-Branch'
2 parents 155a061 + b5081eb commit acbad37

Some content is hidden

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

93 files changed

+2106
-2228
lines changed

Diff for: .gitignore

+124
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,127 @@
11
.DS_Store
22

3+
# Byte-compiled / optimized / DLL files
4+
__pycache__/
5+
*.py[cod]
6+
*$py.class
7+
8+
# C extensions
9+
*.so
10+
11+
# Distribution / packaging
12+
.Python
13+
build/
14+
develop-eggs/
15+
dist/
16+
downloads/
17+
eggs/
18+
.eggs/
19+
lib/
20+
lib64/
21+
parts/
22+
sdist/
23+
var/
24+
wheels/
25+
pip-wheel-metadata/
26+
share/python-wheels/
27+
*.egg-info/
28+
.installed.cfg
29+
*.egg
30+
MANIFEST
31+
32+
# PyInstaller
33+
# Usually these files are written by a python script from a template
34+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
35+
*.manifest
36+
*.spec
37+
38+
# Installer logs
39+
pip-log.txt
40+
pip-delete-this-directory.txt
41+
42+
# Unit test / coverage reports
43+
htmlcov/
44+
.tox/
45+
.nox/
46+
.coverage
47+
.coverage.*
48+
.cache
49+
nosetests.xml
50+
coverage.xml
51+
*.cover
52+
.hypothesis/
53+
.pytest_cache/
54+
55+
# Translations
56+
*.mo
57+
*.pot
58+
59+
# Django stuff:
60+
*.log
61+
local_settings.py
62+
db.sqlite3
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
target/
76+
77+
# Jupyter Notebook
78+
.ipynb_checkpoints
79+
80+
# IPython
81+
profile_default/
82+
ipython_config.py
83+
84+
# pyenv
85+
.python-version
86+
87+
# pipenv
88+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
90+
# having no cross-platform support, pipenv may install dependencies that don’t work, or not
91+
# install all needed dependencies.
92+
#Pipfile.lock
93+
94+
# celery beat schedule file
95+
celerybeat-schedule
96+
97+
# SageMath parsed files
98+
*.sage.py
99+
100+
# Environments
101+
.env
102+
.venv
103+
env/
104+
venv/
105+
ENV/
106+
env.bak/
107+
venv.bak/
108+
109+
# Spyder project settings
110+
.spyderproject
111+
.spyproject
112+
113+
# Rope project settings
114+
.ropeproject
115+
116+
# mkdocs documentation
117+
/site
118+
119+
# mypy
120+
.mypy_cache/
121+
.dmypy.json
122+
dmypy.json
123+
124+
# Pyre type checker
125+
.pyre/
126+
3127

Diff for: AboutDialog.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ def __init__(self, parent, icon1=None,
3737
self.urls = urls
3838
self.licence = licence
3939
self.developers = developers
40-
40+
4141
self.Build()
42-
42+
4343
def Build(self):
44-
44+
4545
# Build the header
4646
Header = wx.BoxSizer(wx.HORIZONTAL)
4747
if self.icon1:
@@ -66,9 +66,9 @@ def Build(self):
6666

6767
# Now the rest;
6868
MainSizer = wx.BoxSizer(wx.VERTICAL)
69-
69+
7070
MainSizer.Add(Header, 0, wx.EXPAND|wx.ALIGN_CENTER|wx.ALL, 5)
71-
71+
7272
if self.long_name:
7373
Label = wx.StaticText(self, label=self.long_name)
7474
of = Label.GetFont()
@@ -89,11 +89,11 @@ def Build(self):
8989
#of = Label.GetFont()
9090
#Font = wx.Font(int(of.GetPointSize() * 1.5), of.GetFamily(), wx.NORMAL, wx.NORMAL)
9191
#Label.SetFont(Font)
92-
92+
9393
Label.Wrap(max(250, 0.9*width))
9494
MainSizer.Add(Label, 0, wx.ALL|wx.ALIGN_CENTER, 5)
9595

96-
96+
9797
if self.licence:
9898
Label = wx.StaticText(self, label="License:")
9999
of = Label.GetFont()
@@ -110,12 +110,12 @@ def Build(self):
110110
Font = wx.Font(of.GetPointSize(), of.GetFamily(), wx.NORMAL, wx.BOLD)
111111
Label.SetFont(Font)
112112
MainSizer.Add(Label, 0, wx.ALL|wx.ALIGN_LEFT, 5)
113-
113+
114114
for developer in self.developers:
115115
Label = wx.StaticText(self, label=" "+developer)
116116
MainSizer.Add(Label, 0, wx.ALL|wx.ALIGN_LEFT, 0)
117-
118-
if self.urls:
117+
118+
if self.urls:
119119
Label = wx.StaticText(self, label="For more information:")
120120
of = Label.GetFont()
121121
Font = wx.Font(of.GetPointSize(), of.GetFamily(), wx.NORMAL, wx.BOLD)
@@ -126,13 +126,13 @@ def Build(self):
126126
label=url,
127127
URL=url)
128128
MainSizer.Add(Link, 0, wx.ALL|wx.ALIGN_CENTER, 2)
129-
129+
130130
MainSizer.Add((1,5),1)
131131
MainSizer.Add(wx.Button(self, id=wx.ID_OK, label="Dismiss"), 0, wx.ALL|wx.ALIGN_RIGHT,5)
132132
SpaceSizer = wx.BoxSizer(wx.VERTICAL)
133133
SpaceSizer.Add(MainSizer, 0, wx.ALL, 10)
134134
self.SetSizerAndFit(SpaceSizer)
135-
135+
136136
if __name__ == "__main__":
137137

138138
a = wx.App(False)
@@ -147,5 +147,5 @@ def Build(self):
147147
"mailto:[email protected]"],
148148
licence="This is a short description of the license used for the program.",
149149
developers = ["A Developer", "Another Developer"])
150-
150+
151151
d.ShowModal()

Diff for: Append_test.py

+14-15
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,26 @@ def __init__(self):
1212
wx.DefaultPosition,
1313
size=(800,600),
1414
style=wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE)
15-
16-
self.objects = []
15+
16+
self.objects = []
1717
self.dragImage = None
1818
self.DragPaper = None
19-
self.hiliteObjects = None
19+
self.hiliteObjects = None
2020
self.lines = []
2121
self.maxWidth = 1000
2222
self.maxHeight = 1000
2323
self.x = self.y = 0
2424
self.curLine = []
2525
self.drawing = False
26-
26+
2727
self.Paper = wx.Bitmap("Paper.BMP", wx.BITMAP_TYPE_BMP)
2828
if self.Paper.Ok():
2929
print "bitmap loaded OK"
3030
else:
3131
raise Exception("bitmap DID NOT load OK")
3232

3333
self.DrawTextOnPaper()
34-
34+
3535
#--------------------------------------------------------------------------
3636
if BUFFERED:
3737
self.buffer = wx.EmptyBitmap(self.maxWidth, self.maxHeight)
@@ -60,27 +60,27 @@ def DrawTextOnPaper(self):
6060
dc.SetFont(wx.Font(36, wx.MODERN, wx.NORMAL, wx.NORMAL, 0, "Arial"))
6161
dc.SetTextForeground(wx.BLACK)
6262
dc.DrawText(text, 155, 25)
63-
63+
6464
def DoDrawing(self, dc, printing=False):
65-
dc.BeginDrawing()
66-
65+
dc.BeginDrawing()
66+
6767
## l1 = ['a','b','c','d']
6868
## text = " "+"".join(l1)
6969
## bg_colour = wx.Colour(57, 115, 57) # matches the bg image
7070
## dc.SetFont(wx.Font(36, wx.MODERN, wx.NORMAL, wx.NORMAL, 0, "Arial"))
7171
## dc.SetTextForeground(wx.BLACK)
7272
## te = dc.GetTextExtent(text)
73-
74-
73+
74+
7575
dc.DrawBitmap(self.Paper, 200, 20, True)
76-
77-
76+
77+
7878
#dc = wx.MemoryDC()
7979
#dc.SelectObject(self.manuscript)
8080
#self.DoDrawing(dc)
81-
81+
8282
## dc.DrawText(text, 225, 25)
83-
83+
8484
dc.EndDrawing()
8585
#--------------------------------------------------------------------------
8686
class MyApp(wx.App):
@@ -95,4 +95,3 @@ def OnInit(self):
9595
if __name__ == "__main__":
9696
app = MyApp(0)
9797
app.MainLoop()
98-

Diff for: BitmapFromBufferTest.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
class BitmapWindow(wx.Window):
1313
def __init__(self, parent, bytearray, *args, **kwargs):
1414
wx.Window.__init__(self, parent, *args, **kwargs)
15-
15+
1616
self.bytearray = bytearray
1717
self.Bind(wx.EVT_PAINT, self.OnPaint)
18-
18+
1919
def OnPaint(self, evt):
2020
dc = wx.PaintDC(self)
2121
bmp = wx.BitmapFromBufferRGBA(200,200, self.bytearray)

Diff for: BitmapFromPILTest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def __init__(self, title = "Bitmap Demo"):
2121
self.bitmap = wx.BitmapFromBuffer(w, h, image.tostring() )
2222

2323
self.Bind(wx.EVT_PAINT, self.OnPaint)
24-
24+
2525
def OnPaint(self, evt):
2626
dc = wx.PaintDC(self)
2727
dc.DrawBitmap(self.bitmap, 10, 10 )

Diff for: BufferedWithControls.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def UpdateDrawing(self):
6363
dc.SelectObject(self._Buffer)
6464
self.Draw(dc)
6565
self.Refresh() # This forces a Paint event, so the screen gets updated.
66-
#self.Update() # If it's not getting updated fast enough, this should force it.
66+
#self.Update() # If it's not getting updated fast enough, this should force it.
6767

6868
class DrawWindow(wxBufferedWindow):
6969
def __init__(self, parent, id = -1):
@@ -119,7 +119,7 @@ def OnBitmapButton(self,event=None):
119119
def CheckB(self):
120120
self.ID_SOSO = wx.NewId()
121121
self.checkB = wx.CheckBox(self, self.ID_SOSO, "test", pos = (50, 50))
122-
122+
123123
class TestFrame(wx.Frame):
124124
def __init__(self):
125125
wx.Frame.__init__(self, None, -1, "Double Buffered Test",

Diff for: ButtonArray.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ class ButtonArrayPanel(wx.Panel):
66
def __init__(self, *args, **kwargs):
77
wx.Panel.__init__(self, *args, **kwargs)
88
Sizer = wx.GridSizer(16, 2, 0, 0)
9-
9+
1010
for i in range(32):
1111
B = wx.Button(self, label = "button %i"%i)
1212
B.Bind(wx.EVT_BUTTON,
1313
lambda evt, but_num = i: self.OnButton(evt, but_num) )
1414
Sizer.Add(B, 0, wx.GROW|wx.ALL, 4)
15-
15+
1616
self.SetSizerAndFit(Sizer)
17-
17+
1818
def OnButton(self, evt, but_num):
1919
print "Button number: %i clicked"%but_num
20-
21-
22-
20+
21+
22+
2323

2424
class DemoFrame(wx.Frame):
2525

@@ -39,10 +39,10 @@ def __init__(self, title = "Button Array Demo"):
3939

4040
self.Bind(wx.EVT_CLOSE, self.OnQuit)
4141

42-
42+
4343
def OnQuit(self,Event):
4444
self.Destroy()
45-
45+
4646

4747
app = wx.App(False)
4848
frame = DemoFrame()

0 commit comments

Comments
 (0)