X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..973ac5bbb2ca39f0f3e21b85c1c130d2215f1552:/wxPython/demo/hangman.py diff --git a/wxPython/demo/hangman.py b/wxPython/demo/hangman.py index 31c7c72fb3..f2e09b5bec 100644 --- a/wxPython/demo/hangman.py +++ b/wxPython/demo/hangman.py @@ -14,7 +14,7 @@ Have fun with it, Harm van der Heijden (H.v.d.Heijden@phys.tue.nl)""" -import random,re,string +import random,re from wxPython.wx import * @@ -47,7 +47,7 @@ class WordFetcher: m = reg.search(self.words[index:]) if m and len(m.groups()[0]) >= self.min_length: break n = n - 1 - if n: return string.lower(m.groups()[0]) + if n: return m.groups()[0].lower() return "error" @@ -292,9 +292,9 @@ class MyFrame(wxFrame): menubar = wxMenuBar() menubar.Append(menu, "Game") menu = wxMenu() - #menu.Append(1010, "Internal", "Use internal dictionary", TRUE) + #menu.Append(1010, "Internal", "Use internal dictionary", True) menu.Append(1011, "ASCII File...") - urls = [ 'wxPython home', 'http://alldunn.com/wxPython/main.html', + urls = [ 'wxPython home', 'http://wxPython.org/', 'slashdot.org', 'http://slashdot.org/', 'cnn.com', 'http://cnn.com', 'The New York Times', 'http://www.nytimes.com', @@ -349,7 +349,7 @@ class MyFrame(wxFrame): def OnGameDemo(self, event): frame = HangmanDemoFrame(self.wf, self, -1, wxDefaultPosition, self.GetSize()) - frame.Show(TRUE) + frame.Show(True) def OnDictFile(self, event): fd = wxFileDialog(self) @@ -431,10 +431,10 @@ class MyApp(wxApp): else: defaultfile = "" wf = WordFetcher(defaultfile) - frame = MyFrame(NULL, wf) + frame = MyFrame(None, wf) self.SetTopWindow(frame) - frame.Show(TRUE) - return TRUE + frame.Show(True) + return True @@ -458,7 +458,7 @@ def runTest(frame, nb, log): wf = WordFetcher(defaultfile) win = MyFrame(frame, wf) frame.otherWin = win - win.Show(true) + win.Show(True) #----------------------------------------------------------------------