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"

turtle dump

2009-07-16 Thread superpollo
hi there. is there a way to dump the content of a turtle window to a file or a file object? bye -- http://mail.python.org/mailman/listinfo/python-list