From 0d691334dfd15a107d855df664ed5d0ce5af32f2 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Sat, 17 Dec 2016 18:12:20 +0100 Subject: [PATCH 1/3] Make compatible with wxPython 3.0 --- src/pythonturtle.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/pythonturtle.py b/src/pythonturtle.py index edf900a..1c15547 100644 --- a/src/pythonturtle.py +++ b/src/pythonturtle.py @@ -154,7 +154,11 @@ def give_focus_to_selected_page(event=None): for [caption, bitmap_file] in self.help_images_list] for page in self.help_pages: - self.help_notebook.AddPage(page, caption=page.caption) + try: + # avoid TypeError: Required argument 'text' in wxPython > 2.9 + self.help_notebook.AddPage(page, text=page.caption) + except TypeError: + self.help_notebook.AddPage(page, caption=page.caption) self.help_close_button_panel = wx.Panel(parent=self.help_screen) self.help_screen_sizer = wx.BoxSizer(wx.VERTICAL) @@ -206,7 +210,7 @@ def init_about_dialog_info(self): An educational environment for learning Python, suitable for beginners and children. Inspired by LOGO. -Runs on Python 2.6, using wxPython, Psyco and py2exe. Thanks go to the developers +Runs on Python 2.6/2.7, using wxPython, Psyco and py2exe. Thanks go to the developers responsible for these projects, as well as to the helpful folks at the user groups of these projects, and at StackOverflow.com, who have helped solved many problems that came up in the making of this program.""" @@ -236,8 +240,12 @@ def __init__(self, parent, bitmap, caption): def run(): multiprocessing.freeze_support() - app = wx.PySimpleApp() - my_app_win = ApplicationWindow(None,-1,"PythonTurtle",size=(600,600)) + try: + # anticipate deprecation (wxPyDeprecationWarning in wxPython >= 2.9) + app = wx.PySimpleApp() + except AttributeError: + app = wx.App() + ApplicationWindow(None, -1, "PythonTurtle", size=(600, 600)) #import cProfile; cProfile.run("app.MainLoop()") app.MainLoop() From fd2768fe27e34baf127e50a95b375a08a6e7cf92 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Sat, 17 Dec 2016 18:26:10 +0100 Subject: [PATCH 2/3] Update Python and wxPython versions in README --- README.markdown | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.markdown b/README.markdown index c5cb6ee..398e695 100644 --- a/README.markdown +++ b/README.markdown @@ -5,16 +5,18 @@ PythonTurtle strives to provide the lowest-threshold way to learn Python. Studen ![Screen shot](http://pythonturtle.org/images/screenshot.gif) -Tested with Python 2.6 and wxPython 2.8.10.1. Currently tested only on Windows and Ubuntu. +Tested with Python version 2.6, 2.7 and wxPython versions 2.8.10.1, 3.0.2.0. +Currently manually tested only on Windows and Ubuntu Linux. This project is licensed under the MIT license. -PythonTurtle was created by Ram Rachum as a side-project in 2009. I also provide +PythonTurtle was created by Ram Rachum as a side-project in 2009. I also provide [freelance Django/Python development services](https://chipmunkdev.com). Installing on Linux: - sudo apt-get install python-wxgtk2.8 git -y + sudo apt-get install python-wxgtk3.0 git -y + # NOTE: install `python-wxgtk2.8` on olders systems git clone https://github.com/cool-RR/PythonTurtle.git cd PythonTurtle/src python pythonturtle.py From 7d0f0d85a7c7fcf3baa5f09a92a7044c1d1018aa Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Sat, 17 Dec 2016 20:48:12 +0100 Subject: [PATCH 3/3] Add AUTHORS from git-log --- AUTHORS.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 AUTHORS.md diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 0000000..2ace76f --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,6 @@ +Authors +------- + +- [Ram Rachum](https://github.com/cool-RR), original author +- [Peter Bittner](https://github.com/bittner), contributor +- [Chris van Es](https://github.com/cvanes), contributor