When I compile Python code the box disappears for Turtle?


So while using the atom-python-run package it works and all, but as I do the Turtle (trying to learn Python really…) it shows up for a split second and then disappears (while the Python box stays there). If I use the actual Python coding element it stays like it should, but using Atom it doesn’t stay. Is there possibly a way to make it stop? Such as a line of code?


What is “it”? You either need to bring a picture or identify exactly the nature of every UI element you see, so that we can get a mental image of what’s going on. Screenshots are usually the easiest way.


Sorry for not that greatest of details. I can’t really screenshot something that disappears. What I meant by that, is when I put in the code :

import turtle
wn = turtle.Screen()
alex = turtle.Turtle()

For example, it’ll run and the Turtle box will pop up, do it’s lines and the like and disappear. Is there a way for the box to not disappear?


You haven’t specified your operating system, but for Windows I use ShareX, which includes a recording feature that’s perfect for capturing things that disappear.

Is there a way for the box to not disappear?

When I try to run something with atom-python-run, the command line window it spawns stays open afterwards.

Looking at the settings for the package (Settings -> Packages -> atom-python-run), I see two checkboxes that seem to indicate that the related keybinding will pause execution after it’s done. You should check to see how they’re configured on your computer.


I’m not sure whether DamnedScholar’s suggestion would work in this case, as it simply keeps the command window open. But at this point the application has already terminated and closed its graphical output window.

As an alternative, you can always add a line to your application to pause execution. One such statement is reading user input. Simply add the following line at the end of your program:

raw_input('Press RETURN to exit')

Apart from pausing the application, this statement actually reads input from the user and returns it. You can store it in a variable for later reuse like so:

my_name = raw_input('What is your name? ')
print('Pleased to meet you, {}'.format(my_name))


@Snowburden never said that the output window was graphical, just that the results of atom-python-run were disappearing on successful execution. I provided a solution to that problem.


It’s Turtle Graphics, see Wikipedia.

Odds are your solution will keep the graphical window open as well, as I see there’s a “Pause” checkbox which I missed in my first read. But if it shouldn’t, he can use my workaround.


Use the lowercase ‘i’ parameter of your Python interpreter, then it stays open.

For example:
python -i turtle.py

-i : inspect interactively after running script; forces a prompt even
if stdin does not appear to be a terminal


Just like to add, raw_input() is Python 2

Python 2: input() == Python 3: eval(input())
Python 2: raw_input() == Python 3: input()