Re: [Edu-sig] Any suggestions about turlte.py
Atanas, Thanks for the input - I wasn't aware of the first problem you mention. I'm not sure about the secnond issue - do you mean that a turtle program that is *running* will hang if covered by other graphics? Or that a window with an already completed drawing/program will become unrresponsive? I've seen the second behavior, but not the first. Thanks, Vern Radenski, Atanas wrote: Hi, Thank you for taking care of the turtle.py module. Here are tow suggestions. [1] I would suggest a correction of a bug in the fill function of turtle.py. The statement: # self._canvas.lower(item) should be removed. As it is now, it lowers polygons when filled. This causes inconsistent behavior because nothing else is lowered. Here is a suggested the statement in context: def fill(self, flag): if self._filling: path = tuple(self._path) smooth = self._filling 0 if len(path) 2: item = self._canvas._create('polygon', path, {'fill': self._color, 'smooth': smooth}) self._items.append(item) # Should be removed, because # nothing else is lowered but filled polygons: # self._canvas.lower(item) if self._tofill: for item in self._tofill: self._canvas.itemconfigure(item, fill=self._color) self._items.append(item) self._path = [] self._tofill = [] self._filling = flag if flag: self._path.append(self._position) self.forward(0) [2] A nuisance with this otherwise quite useful module is its behavior in Windows systems: It tends to *stop responding*. This happens when the canvas is covered by other graphics for a while, especially in cases when execution is triggered form the interactive prompt. It would be great if this problem can be fixed (although I am not sure what can be done about it.) Atanas Atanas Radenski mailto:[EMAIL PROTECTED] http://www.chapman.edu/~radenski/ I find television very educating. Every time somebody turns on the set, I go into the other room and read a book - Groucho Marx -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vern Ceder Sent: Monday, February 27, 2006 11:32 AM To: Edu-sig@python.org Subject: [Edu-sig] Any suggestions about turlte.py Hello everyone, As a consequence of my complaining about it in my PyCon talk, I have been invited to submit some patches for turtle.py. To my mind, turtle.py should be something that one could actually use for some very simple programming with graphics lessons, with NO tweaking or additional software. So I think the following would be handy: 1. equally usable with either import * from turtle or import turtle imports 2. should open with a window covering at least half the screen (the current default is too small to be useful) 3. should offer some simple configuration choices for things like initial size and shape, but mostly rely on reasonable defaults 4. should offer a class wrapper so that that one could easily instantiate different turtles for a first experience with objects. 5. some minor tweaks to make it better behaved when run from IDLE Does anyone have any feedback on these ideas or any other suggestions about how turtle.py might be improved without being fundamentally changed? Note: this is about turtle.py only, for all its deficiencies. Any suggestions to try another library, system, or language will be cheerfully, but resolutely, ignored. ;) Cheers, Vern Ceder -- This time for sure! -Bullwinkle J. Moose - Vern Ceder, Director of Technology Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 [EMAIL PROTECTED]; 260-436-0746; FAX: 260-436-5137 ___ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig -- This time for sure! -Bullwinkle J. Moose - Vern Ceder, Director of Technology Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 [EMAIL PROTECTED]; 260-436-0746; FAX: 260-436-5137 ___ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
Re: [Edu-sig] Any suggestions about turlte.py
Vern, My apologies for being unclear. In Windows, turtle commands in interactive mode have been most problematic, meaning that Tk becomes irresponsive. In Windows XP, this can be simulated very easily. 0. Launch IDLE and run a Python shell. 1. Launch IE Explorer and make sure it covers the Python shell. 2. Bring the shell to the front and enter: import turtle; pen = turtle.Pen(); After this, Tk becomes unresponsive. In addition, I believe my students have had problems of the second type you refer to: when a window with an already completed drawing/program becomes unresponsive. Unfortunately, I could not recreate such a situation today. I do not think I have had problems with a turtle program that is *running*. I have found Turtle graphics very useful, despite of all difficulties in Windows. Even a partial improvement would be beneficial. To me it seems very important to keep the new turtle module as compatible as possible with the current one. The reason is the turtle module has already been used in various publications or internal teaching materials. It would be nice if the updated turtle can be used with existing resources. Again, thank you for doing this. Atanas Atanas Radenski mailto:[EMAIL PROTECTED] http://www.chapman.edu/~radenski/ I find television very educating. Every time somebody turns on the set, I go into the other room and read a book - Groucho Marx -Original Message- From: Vern Ceder [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 28, 2006 5:49 AM To: Radenski, Atanas; Edu-sig@python.org Subject: Re: [Edu-sig] Any suggestions about turlte.py Atanas, Thanks for the input - I wasn't aware of the first problem you mention. I'm not sure about the secnond issue - do you mean that a turtle program that is *running* will hang if covered by other graphics? Or that a window with an already completed drawing/program will become unrresponsive? I've seen the second behavior, but not the first. Thanks, Vern Radenski, Atanas wrote: Hi, Thank you for taking care of the turtle.py module. Here are tow suggestions. [1] I would suggest a correction of a bug in the fill function of turtle.py. The statement: # self._canvas.lower(item) should be removed. As it is now, it lowers polygons when filled. This causes inconsistent behavior because nothing else is lowered. Here is a suggested the statement in context: def fill(self, flag): if self._filling: path = tuple(self._path) smooth = self._filling 0 if len(path) 2: item = self._canvas._create('polygon', path, {'fill': self._color, 'smooth': smooth}) self._items.append(item) # Should be removed, because # nothing else is lowered but filled polygons: # self._canvas.lower(item) if self._tofill: for item in self._tofill: self._canvas.itemconfigure(item, fill=self._color) self._items.append(item) self._path = [] self._tofill = [] self._filling = flag if flag: self._path.append(self._position) self.forward(0) [2] A nuisance with this otherwise quite useful module is its behavior in Windows systems: It tends to *stop responding*. This happens when the canvas is covered by other graphics for a while, especially in cases when execution is triggered form the interactive prompt. It would be great if this problem can be fixed (although I am not sure what can be done about it.) Atanas Atanas Radenski mailto:[EMAIL PROTECTED] http://www.chapman.edu/~radenski/ I find television very educating. Every time somebody turns on the set, I go into the other room and read a book - Groucho Marx -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vern Ceder Sent: Monday, February 27, 2006 11:32 AM To: Edu-sig@python.org Subject: [Edu-sig] Any suggestions about turlte.py Hello everyone, As a consequence of my complaining about it in my PyCon talk, I have been invited to submit some patches for turtle.py. To my mind, turtle.py should be something that one could actually use for some very simple programming with graphics lessons, with NO tweaking or additional software. So I think the following would be handy: 1. equally usable with either import * from turtle or import turtle imports 2. should open with a window covering at least half the screen (the current default is too small to be useful) 3. should offer some simple configuration choices for things like initial size and shape, but mostly rely on reasonable defaults 4. should offer a class wrapper so
[Edu-sig] Any suggestions about turlte.py
Hello everyone, As a consequence of my complaining about it in my PyCon talk, I have been invited to submit some patches for turtle.py. To my mind, turtle.py should be something that one could actually use for some very simple programming with graphics lessons, with NO tweaking or additional software. So I think the following would be handy: 1. equally usable with either import * from turtle or import turtle imports 2. should open with a window covering at least half the screen (the current default is too small to be useful) 3. should offer some simple configuration choices for things like initial size and shape, but mostly rely on reasonable defaults 4. should offer a class wrapper so that that one could easily instantiate different turtles for a first experience with objects. 5. some minor tweaks to make it better behaved when run from IDLE Does anyone have any feedback on these ideas or any other suggestions about how turtle.py might be improved without being fundamentally changed? Note: this is about turtle.py only, for all its deficiencies. Any suggestions to try another library, system, or language will be cheerfully, but resolutely, ignored. ;) Cheers, Vern Ceder -- This time for sure! -Bullwinkle J. Moose - Vern Ceder, Director of Technology Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 [EMAIL PROTECTED]; 260-436-0746; FAX: 260-436-5137 ___ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig