473,399 Members | 4,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

IDLE and turtle

I typically use IDLE for editing and debug. On Windows at least, IDLE
and the standard turtle graphics module do not mix. I think both use
Tkinter.

For now I use IPython and Jedit when using the turtle module but it's
not a great solution for me. Is there any known work-around to use
turtle with IDLE? If not is there a planned fix for the problem. I
find turtle is a convenient way to do simple graphics without having
to install external modules or deal with event handlers or windowing
details.

-- David
Jul 18 '05 #1
1 6698


db*****@yahoo.com schrieb:
I typically use IDLE for editing and debug. On Windows at least, IDLE
and the standard turtle graphics module do not mix. I think both use
Tkinter.

For now I use IPython and Jedit when using the turtle module but it's
not a great solution for me. Is there any known work-around to use
turtle with IDLE? If not is there a planned fix for the problem. I
find turtle is a convenient way to do simple graphics without having
to install external modules or deal with event handlers or windowing
details.

-- David


With Python 2.2 and IDLE 0.8 it was no problem to use turtle.py (and
Tkinter in general) interactively, because tha application and IDLE
itself ran in the same process (using the same mainloop()).

As this turned out to be a problem when writing programs of some
complextiy the decision was made to change the way IDLE runs
programs, namely in their own processes with their own namespaces.

*Un*fortunately this proved to be a problem for interactively using
and exploring Tkinter.

*Fortunately* there is a way to use the new IDLE 1.0 exactly the
same way as the old IDLE 0.8: to use it with the -n option.

Under Windows e. g. you have to change the link which calls IDLE as
follows (or similar):

C:\Python23\pythonw.exe "C:\Python23\Lib\idlelib\idle.pyw " -n

This makes IDLE starting up without subprocesses, which is indicated
by the message

IDLE 1.0.2 ==== No Subprocess ====


in the Shell window. This way you can execute turtle graphics commands
immediately and also explore and construct GUIs with Tkinter interactively.

But keep in mind, that this makes program development more error prone.
Normally this does not matter when developing tiny turtle graphics
programs.

I use to use two versions of IDLE (and I have two coresponding icons
on my desktop). The one with the -n - option for interactive explorations,
the other one, configured like it comes out of the box, for developing
more complex programs.

HTH, Gregor
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Moosebumps | last post by:
So say I am working on two separate .py files in IDLE that are part of the same program. Does anyone have problems where when you modify one file, and then run the other, the changes you made in...
4
by: Brent W. Hughes | last post by:
If the Turtle gets himself into a large (or infinite) loop, is there any way to stop him other than Ctrl-Alt-Del? Brent
1
by: Brent W. Hughes | last post by:
I'm using the turtle graphics module and am trying to teach it to my kids. The slowness of the turtle in drawing things is good at first because it's fun watching it do its thing. But now we'd...
10
by: JulianP | last post by:
Hi I am working on a Turtle Program and I have put in all the fancy schmancy stuff in I just cant seem to figure out how to print the T, which is my turtle, on the screen. Here is the code for my...
7
by: Dick Moores | last post by:
I accidentally stumbled across the Turtle Graphics module (turtle.py) the other day and have been having some fun with it. Now I'm wondering if there is a way to build into a script the saving...
5
by: tomy | last post by:
Hi All I am a newbie to turtle graphics in python, so sorry if you find this question too easy. How can I get smoother lines in turtle graphics? I am using python on windows. Thanks in advance
4
by: hello123 | last post by:
I saw this program from a website... Any solution ? Turtle Graphics: The Logo language, which is particularly popular among personal computer user, made the concept of turtle graphics famous. ...
1
by: Alexander.Oot | last post by:
I think the speed function may be broken from the turtle graphics package "from turtle import * speed('fastest') forward(50)"
1
by: Allen | last post by:
I'm using the turtle module in Python. Is there a way to save the turle state at any moment for recursive algorithms to easily return the turtle to an earlier point for another branch/etc? ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.