Re: Turtle module

2021-05-26 Thread Greg Ewing
On 27/05/21 4:17 am, Chris Angelico wrote: Worst case, it is technically available as the ._fullcircle member, but I would advise against using that if you can help it! If you're worried about that, you could create your own turle subclass that tracks the state how you want. -- Greg -- https:/

Re: Turtle module

2021-05-26 Thread boB Stepp
On Wed, May 26, 2021 at 10:59 AM Michael F. Stemper wrote: > In order to turn the turtle, I need to select a way to represent > angles. I could use either degrees or radians (or, I suppose, > grads). However, for my functions to work, I need to set the > turtle to that mode. This means that I cou

Re: Turtle module

2021-05-26 Thread Chris Angelico
On Thu, May 27, 2021 at 6:51 AM Michael F. Stemper wrote: > > On 26/05/2021 11.17, Chris Angelico wrote: > > On Thu, May 27, 2021 at 1:59 AM Michael F. Stemper > > wrote: > > > >>What I would like to do is capture the > >> angle-representation mode on entry and restore it on return. > >> How

Re: Turtle module

2021-05-26 Thread Michael F. Stemper
On 26/05/2021 13.24, Stefan Ram wrote: "Michael F. Stemper" writes: What I would like to do is capture the angle-representation mode on entry and restore it on return. another one: def f( turtle_ ): my_turtle = turtle_.clone() # now work with my_turtle on

Re: Turtle module

2021-05-26 Thread Michael F. Stemper
On 26/05/2021 11.17, Chris Angelico wrote: On Thu, May 27, 2021 at 1:59 AM Michael F. Stemper wrote: What I would like to do is capture the angle-representation mode on entry and restore it on return. However, looking through the methods of turtle.Turtle(), I can't find any means of captu

Re: Turtle module

2021-05-26 Thread Chris Angelico
On Thu, May 27, 2021 at 1:59 AM Michael F. Stemper wrote: > In order to turn the turtle, I need to select a way to represent > angles. I could use either degrees or radians (or, I suppose, > grads). However, for my functions to work, I need to set the > turtle to that mode. This means that I could

Re: Turtle graphics under the console under Windows

2017-08-25 Thread Michael Torrie
On 08/25/2017 06:10 AM, Stefan Ram wrote: > Do I miss any means to make the turtle graphics window > behave more normally and at the same time be able to draw > graphics interactivley from the console, watching the result > of one move command and then interacticely typing in more > move

Re: Turtle window not closing

2017-04-23 Thread Peter Otten
Harshika Varadhan via Python-list wrote: > Thank you for your response. I apologize for that, this is my first time > posting so I wasn't sure how to copy my code! I figured out that using the > clear() method works for clearing the turtle window after drawing the game > board, but now I am trying

Re: Turtle window not closing

2017-04-22 Thread Terry Reedy
On 4/22/2017 3:52 AM, Peter Otten wrote: Harshika Varadhan via Python-list wrote: Are you running your script from within IDLE? Try starting it from the command line instead. Like turtle IDLE itself is a program written in tkinter, and the separation between editer and user code is not alwa

Re: Turtle window not closing

2017-04-22 Thread Harshika Varadhan via Python-list
Thank you for your response. I apologize for that, this is my first time posting so I wasn't sure how to copy my code!  I figured out that using the clear() method works for clearing the turtle window after drawing the game board, but now I am trying to figure out how to make the program wait a

Re: Turtle window not closing

2017-04-22 Thread Peter Otten
Harshika Varadhan via Python-list wrote: > I am creating a game where the user inputs a coordinate to place their > piece on a chess board. My code then draws the chess board with a turtle > and fills in the squares in with green where the user can place their next > piece. After the user inputs t

Re: turtle ??

2016-03-09 Thread Chris Angelico
On Thu, Mar 10, 2016 at 5:14 PM, Marko Rauhamaa wrote: > Chris Angelico : > >> A Turkish keyboard should have dotless and dotted, uppercase and >> lowercase, all easily typed. > > BTW, typing any useful Unicode character is a major unsolved problem. I > have created this text file that contains a

Re: turtle ??

2016-03-09 Thread Jussi Piitulainen
Marko Rauhamaa writes: > Chris Angelico : > >> A Turkish keyboard should have dotless and dotted, uppercase and >> lowercase, all easily typed. > > BTW, typing any useful Unicode character is a major unsolved > problem. I have created this text file that contains a lot of unicode > characters with

Re: turtle ??

2016-03-09 Thread Marko Rauhamaa
Chris Angelico : > A Turkish keyboard should have dotless and dotted, uppercase and > lowercase, all easily typed. BTW, typing any useful Unicode character is a major unsolved problem. I have created this text file that contains a lot of unicode characters with their code points. Every once in a

Re: turtle ??

2016-03-09 Thread Chris Angelico
On Thu, Mar 10, 2016 at 1:45 PM, Steven D'Aprano wrote: > On Thu, 10 Mar 2016 05:14 am, MRAB wrote: > >> FYI, the uppercase of "ı" is "I" and the lowercase of "İ" is "i". > > Very true. Does that tell us anything about the placement and ease of > getting I on a Turkish keyboard? > > I'm just givin

Re: turtle ??

2016-03-09 Thread Steven D'Aprano
On Thu, 10 Mar 2016 05:14 am, MRAB wrote: > FYI, the uppercase of "ı" is "I" and the lowercase of "İ" is "i". Very true. Does that tell us anything about the placement and ease of getting I on a Turkish keyboard? I'm just giving the OP the benefit of the doubt. Maybe they have a good reason for

Re: turtle ??

2016-03-09 Thread MRAB
On 2016-03-09 11:55, Steven D'Aprano wrote: On Wed, 9 Mar 2016 08:06 pm, Peter Otten wrote: Ömer sarı wrote: l would like to ask a question as l m a little bit confused . In computing details matter, and in communication odd personal habits distract from the actual message. Please reconside

Re: turtle ??

2016-03-09 Thread Terry Reedy
On 3/9/2016 2:39 AM, Ömer sarı wrote: import turtle # Allows us to use turtles wn = turtle.Screen() # Creates a playground for turtles alex = turtle.Turtle()# Create a turtle, assign to alex alex.forward(50) # Tell alex to move forward by 50 units alex.left(

Re: turtle ??

2016-03-09 Thread Joel Goldstick
On Wed, Mar 9, 2016 at 6:55 AM, Steven D'Aprano wrote: > On Wed, 9 Mar 2016 08:06 pm, Peter Otten wrote: > > > Ömer sarı wrote: > > > >> l would like to ask a question as l m a little bit confused . > > > > In computing details matter, and in communication odd personal habits > > distract from th

Re: turtle ??

2016-03-09 Thread Steven D'Aprano
On Wed, 9 Mar 2016 08:06 pm, Peter Otten wrote: > Ömer sarı wrote: > >> l would like to ask a question as l m a little bit confused . > > In computing details matter, and in communication odd personal habits > distract from the actual message. Please reconsider your use of an "l" as > a replacem

Re: turtle ??

2016-03-09 Thread Peter Otten
Ömer sarı wrote: > l would like to ask a question as l m a little bit confused . In computing details matter, and in communication odd personal habits distract from the actual message. Please reconsider your use of an "l" as a replacement for "I". > l do practice > in "how to think like a comp

Re: Turtle

2016-01-15 Thread Alister
On 14/01/16 22:22, Stallone Carl wrote: Dear sir/madam I am currently using python 3.5.0 and I have been trying to write a program using turtle but is not seem to be working. I have followed all tutarial on the web and when i compare it with my code my am duing everything the same way but it stil

Re: Turtle

2016-01-15 Thread Dave Farrance
Stallone Carl wrote: >I am currently using python 3.5.0 and I have been trying to write a program >using turtle but is not seem to be working. I have followed all tutarial on >the web and when i compare it with my code my am duing everything the same >way but it still don't seems to be working I

Re: Turtle

2016-01-15 Thread Bernardo Sulzbach
Maybe the tutorial is using Python 2. Always provide a SSCCE and, when it makes sense, the error message. -- https://mail.python.org/mailman/listinfo/python-list

Re: Turtle graphics speed(). Seems broken

2010-02-27 Thread Alf P. Steinbach
* Dr. Phillip M. Feldman: Stefan Behnel-3 wrote: [email protected] wrote: I think the speed function may be broken from the turtle graphics package "from turtle import * speed('fastest') forward(50)" I have tried all of the different speed settings, but I get no change in the turtl

Re: Turtle graphics speed(). Seems broken

2010-02-27 Thread Dr. Phillip M. Feldman
Stefan Behnel-3 wrote: > > [email protected] wrote: >> I think the speed function may be broken from the turtle graphics package >> >> >> "from turtle import * >> >> speed('fastest') >> >> forward(50)" >> >> >> I have tried all of the different speed settings, but I get no change >>

Re: turtle, ipython, and pylab don't mix

2010-01-20 Thread Robert Kern
On 2010-01-20 08:40 AM, Brian Blais wrote: Hello, I am noticing a hard crash of the ipython interpreter, with the pylab option, with the turtle module. I am on Win XP, Enthought Edition 6.0.0 which uses Python 2.6. I can't reproduce it without the pylab option, nor on the Mac (with an earlier En

Re: Turtle Graphics are incompatible with gmpy

2009-08-05 Thread Mensanator
On Aug 5, 7:49 pm, Gregor Lingl wrote: > Mensanator schrieb: > > > On Aug 5, 5:31 pm, Mensanator wrote: > >> I fixed this to produce the actual image I'm looking > >> for instead of that stupid black square. All I did was > >> use up() & dowm() in place of penup(), pendown() and > >> replace dot(

Re: Turtle Graphics are incompatible with gmpy

2009-08-05 Thread Gregor Lingl
Mensanator schrieb: On Aug 5, 5:31 pm, Mensanator wrote: I fixed this to produce the actual image I'm looking for instead of that stupid black square. All I did was use up() & dowm() in place of penup(), pendown() and replace dot(2) with forward(1). I'll be posting a followup report later.

Re: Turtle Graphics are incompatible with gmpy

2009-08-05 Thread Mensanator
On Aug 5, 5:31 pm, Mensanator wrote: > I fixed this to produce the actual image I'm looking > for instead of that stupid black square. All I did was > use up() & dowm() in place of penup(), pendown() and > replace dot(2) with forward(1). > > I'll be posting a followup report later. > http://www.m

Re: Turtle Graphics are incompatible with gmpy

2009-08-05 Thread Mensanator
I fixed this to produce the actual image I'm looking for instead of that stupid black square. All I did was use up() & dowm() in place of penup(), pendown() and replace dot(2) with forward(1). I'll be posting a followup report later. import gmpy ## (even) hi| ##| ##

Re: Turtle Graphics are incompatible with gmpy

2009-08-05 Thread Mensanator
On Aug 5, 12:56 pm, Gregor Lingl wrote: > Mensanator schrieb: > > > > > > >> It didn't form 2.5 to 2.6 (at least not intentionally). But with the > >> indroduction of the TurtleScreen class and the Screen class/object > >> (singleton) a few of the turtle methods were also implemented as screen > >

Re: Turtle Graphics are incompatible with gmpy

2009-08-05 Thread Mensanator
On Aug 5, 3:08 pm, Ethan Furman wrote: > Mensanator wrote: > > > > > > > > > > > What does this mean? > > import turtle > tooter = turtle.Turtle() > *tooter*.tracer > > > Traceback (most recent call last): > >   File "", line 1, in > >     tooter.tracer > > AttributeError: 'Turtle' o

Re: Turtle Graphics are incompatible with gmpy

2009-08-05 Thread Ethan Furman
Mensanator wrote: What does this mean? import turtle tooter = turtle.Turtle() *tooter*.tracer Traceback (most recent call last): File "", line 1, in tooter.tracer AttributeError: 'Turtle' object has no attribute 'tracer' tooter.hideturtle() tooter.speed('fast') turtle.update() *

Re: Turtle Graphics are incompatible with gmpy

2009-08-05 Thread Wolfram Hinderer
On 5 Aug., 21:31, Mensanator wrote: > > >>> import turtle > >>> tooter = turtle.Turtle() > >>> tooter.tracer > > Traceback (most recent call last): >   File "", line 1, in >     tooter.tracer > AttributeError: 'Turtle' object has no attribute 'tracer'>>> > tooter.hideturtle() > >>> tooter.speed(

Re: Turtle Graphics are incompatible with gmpy

2009-08-05 Thread Mensanator
On Aug 5, 2:19 am, Steven D'Aprano wrote: > On Wed, 5 Aug 2009 03:49 pm Mensanator wrote: > > > In 3.1, tracing is now a screen attribute, not a turtle atribute. > > I have no idea why > > >   tooter = turtle.Turtle() > >   tooter.tracer(False) > > > doesn't give me an error (I thought silent erro

Re: Turtle Graphics are incompatible with gmpy

2009-08-05 Thread Gregor Lingl
Mensanator schrieb: It didn't form 2.5 to 2.6 (at least not intentionally). But with the indroduction of the TurtleScreen class and the Screen class/object (singleton) a few of the turtle methods were also implemented as screen methods and as turtle methods declared deprecated (see docs of Python

Re: Turtle Graphics are incompatible with gmpy

2009-08-05 Thread Mensanator
> It didn't form 2.5 to 2.6 (at least not intentionally). But with the > indroduction of the TurtleScreen class and the Screen class/object > (singleton) a few of the turtle methods were also implemented as screen > methods and as turtle methods declared deprecated (see docs of Python > 2.6). These

Re: Turtle Graphics are incompatible with gmpy

2009-08-05 Thread casevh
On Aug 5, 12:19 am, Steven D'Aprano wrote: > On Wed, 5 Aug 2009 03:49 pm Mensanator wrote: > > > In 3.1, tracing is now a screen attribute, not a turtle atribute. > > I have no idea why > > >   tooter = turtle.Turtle() > >   tooter.tracer(False) > > > doesn't give me an error (I thought silent err

Re: Turtle Graphics are incompatible with gmpy

2009-08-05 Thread Gregor Lingl
Steven D'Aprano schrieb: On Wed, 5 Aug 2009 03:49 pm Mensanator wrote: In 3.1, tracing is now a screen attribute, not a turtle atribute. I have no idea why tooter = turtle.Turtle() tooter.tracer(False) doesn't give me an error (I thought silent errors were a bad thing). What makes it an

Re: Turtle Graphics are incompatible with gmpy

2009-08-05 Thread Gregor Lingl
Mensanator schrieb: I hadn't noticed this before, but the overhaul of Turtle Graphics dating back to 2.6 has been broken as far as gmpy is concerned. I hadn't noticed because I usually have tracing turned off (tracing off takes 3-4 seconds, tracing on takes 6-7 minutes). In 3.1, tracing is now

Re: Turtle Graphics are incompatible with gmpy

2009-08-05 Thread Steven D'Aprano
On Wed, 5 Aug 2009 03:49 pm Mensanator wrote: > In 3.1, tracing is now a screen attribute, not a turtle atribute. > I have no idea why > > tooter = turtle.Turtle() > tooter.tracer(False) > > doesn't give me an error (I thought silent errors were a bad thing). What makes it an error? Do you

Re: Turtle Graphics are incompatible with gmpy

2009-08-05 Thread casevh
On Aug 4, 10:49 pm, Mensanator wrote: > I hadn't noticed this before, but the overhaul of Turtle Graphics > dating > back to 2.6 has been broken as far as gmpy is concerned. > The reason is that code in turtle.py was chabged from > > v2.5 >         if self._drawing: >             if self._tracing:

Re: turtle dump

2009-07-17 Thread Peter Otten
Terry Reedy wrote: > alex23 wrote: > >> The help in iPython says the same, but also mentions that it's a >> dynamically generated function, so it may not be picking up the >> docstring that way. turtle.ScrolledCanvas.postscript is similarly >> terse, but you can find more info in turtle.Canvas.po

Re: turtle dump

2009-07-17 Thread Terry Reedy
David Robinow wrote: If you want to generate high-quality graphics easily you need different primitives. http://cairographics.org has Python bindings, but I don't know if it's available on Windows. Effectively not, as far as I can tell. PyCairo appears to be *nix and require later binaries tha

Re: turtle dump

2009-07-17 Thread David Robinow
>> If you want to generate high-quality graphics easily you need different >> primitives. >> >> http://cairographics.org >> >> has Python bindings, but I don't know if it's available on Windows. > > Effectively not, as far as I can tell. PyCairo appears to be *nix and > require later binaries than

Re: turtle dump

2009-07-17 Thread Terry Reedy
alex23 wrote: The help in iPython says the same, but also mentions that it's a dynamically generated function, so it may not be picking up the docstring that way. turtle.ScrolledCanvas.postscript is similarly terse, but you can find more info in turtle.Canvas.postscript: Print the contents of

Re: turtle dump

2009-07-17 Thread Terry Reedy
Peter Otten wrote: Terry Reedy wrote: I tried it. Unfortunately, OOo does not open it correctly. It just displays the first three lines of metadate - Title, Creator, Date -- as image text. Photoshop does read the image, and does an ok job of conversion once anti-aliasing is turned off. I snat

Re: turtle dump

2009-07-16 Thread Peter Otten
Terry Reedy wrote: > Terry Reedy wrote: > >>> $ file tmp.ps >>> tmp.ps: PostScript document text conforming DSC level 3.0, type EPS >>> >>> Try changing the file extension from .ps to .eps. >> >> I will. Thank you. > > I tried it. Unfortunately, OOo does not open it correctly. It just > display

Re: turtle dump

2009-07-16 Thread Terry Reedy
Terry Reedy wrote: $ file tmp.ps tmp.ps: PostScript document text conforming DSC level 3.0, type EPS Try changing the file extension from .ps to .eps. I will. Thank you. I tried it. Unfortunately, OOo does not open it correctly. It just displays the first three lines of metadate - Title, C

Re: turtle dump

2009-07-16 Thread alex23
> >> Help on method postscript: > >> postscript(self, *args, **kw) method of turtle.ScrolledCanvas instance > >> is spectacularly useless. > > This is from interactive help. The help in iPython says the same, but also mentions that it's a dynamically generated function, so it may not be picking up

Re: turtle dump

2009-07-16 Thread Terry Reedy
Peter Otten wrote: Terry Reedy wrote: Help on method postscript: postscript(self, *args, **kw) method of turtle.ScrolledCanvas instance is spectacularly useless. This is from interactive help. http://docs.python.org/library/turtle.html#turtle.getcanvas That method, following your lead,

Re: turtle dump

2009-07-16 Thread Peter Otten
Terry Reedy wrote: > Michiel Overtoom wrote: >> >> I got success with the following code (python 2.6.2): >> >> import turtle >> turtle.reset() >> for i in range(4): >>turtle.forward(50) >>turtle.right(90) >> can=turtle.getscreen().getcanvas() >> can.postscript(file="tmp.ps") > > Is raw

Re: turtle dump

2009-07-16 Thread Terry Reedy
Michiel Overtoom wrote: I got success with the following code (python 2.6.2): import turtle turtle.reset() for i in range(4): turtle.forward(50) turtle.right(90) can=turtle.getscreen().getcanvas() can.postscript(file="tmp.ps") Is raw postscript (.ps) the only thing tk can write from can

Re: turtle dump

2009-07-16 Thread alex23
On Jul 16, 10:11 pm, superpollo wrote: > actually i am still using 2.3.4, which means that... > > > screen = turtle.Screen() > > ... is not possible Ah, sorry about that. My belief that turtle was a new module was based on a line from http://us.pycon.org/media/2009/talkdata/PyCon2009/065/SevenWa

Re: turtle dump

2009-07-16 Thread Michiel Overtoom
I got success with the following code (python 2.6.2): import turtle turtle.reset() for i in range(4): turtle.forward(50) turtle.right(90) can=turtle.getscreen().getcanvas() can.postscript(file="tmp.ps") -- "The ability of the OSS process to collect and harness the collective IQ of thousa

Re: turtle dump

2009-07-16 Thread superpollo
Peter Otten wrote: Tested on 2.4: import turtle turtle.reset() for i in range(4): ... turtle.forward(50) ... turtle.right(90) ... turtle._canvas.postscript(file="tmp.ps") '' I think the big rewrite has happened in 2.6, so the above should also work in 2.3. Peter mr otten,

Re: turtle dump

2009-07-16 Thread Peter Otten
superpollo wrote: > alex23 wrote: >> On Jul 16, 9:18 pm, superpollo wrote: >> >>>lol. ;-) the title was indeed supposed to stir a bit of curiosity upon >>>the reader... >> >> >> Which isn't really useful when trying to obtain assistance... you want >> certainty, not curiosity. >> > > ok. my

Re: turtle dump

2009-07-16 Thread Bearophile
Superchicken: > is there a way to dump the content of a turtle window to a file or a file > object? A possible low-tech solution is to append to a list the sequence of your plotting commands (using a decorator too, even, something like the logging decorator), and then save all of them at the end

Re: turtle dump

2009-07-16 Thread superpollo
alex23 wrote: On Jul 16, 9:18 pm, superpollo wrote: lol. ;-) the title was indeed supposed to stir a bit of curiosity upon the reader... Which isn't really useful when trying to obtain assistance... you want certainty, not curiosity. ok. my bad. in fact i was looking for a *platform

Re: turtle dump

2009-07-16 Thread alex23
On Jul 16, 9:18 pm, superpollo wrote: > lol. ;-) the title was indeed supposed to stir a bit of curiosity upon > the reader... Which isn't really useful when trying to obtain assistance... you want certainty, not curiosity. > in fact i was looking for a *platform independent* way to draw into a

Re: turtle dump

2009-07-16 Thread superpollo
Diez B. Roggisch wrote: superpollo wrote: hi there. is there a way to dump the content of a turtle window to a file or a file object? Why should I want to dump a turtle? They are very benign creatures, dumping them is going to hurt them needlessly. lol. ;-) the title was indeed supposed

Re: turtle dump

2009-07-16 Thread Diez B. Roggisch
superpollo wrote: > hi there. > > is there a way to dump the content of a turtle window to a file or a > file object? Why should I want to dump a turtle? They are very benign creatures, dumping them is going to hurt them needlessly. Without a cheek-in-tongue: how are we supposed to know what a"

Re: turtle ?

2008-12-23 Thread sai
On Tue, Dec 23, 2008 at 2:29 AM, Gerhard Häring wrote: > sai wrote: >> python newbie here :-) >> >> I am trying to get turtle to run but got stuck here: >> >> $ python >> Python 2.5.2 (r252:60911, Aug 5 2008, 16:17:28) >> [GCC 4.2.2 20071128 (prerelease) (4.2.2-3.1mdv2008.0)] on linux2 >> Type "

Re: turtle ?

2008-12-23 Thread Gerhard Häring
sai wrote: > python newbie here :-) > > I am trying to get turtle to run but got stuck here: > > $ python > Python 2.5.2 (r252:60911, Aug 5 2008, 16:17:28) > [GCC 4.2.2 20071128 (prerelease) (4.2.2-3.1mdv2008.0)] on linux2 > Type "help", "copyright", "credits" or "license" for more information.

Re: Turtle graphics speed(). Seems broken

2008-02-15 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: > I think the speed function may be broken from the turtle graphics > package > > > "from turtle import * > > speed('fastest') > > forward(50)" > > > I have tried all of the different speed settings, but I get no change > in the turtle's speed does anyone know how