'Is it possible to use turtle without the graphics window?

I am working on a simulation which requires geometric computations. turtle library makes my life much easier because of the convenient functions that I can use such as towards(), setheading(), goto(), etc.

However, I do not need to see the drawing. Is there a way to turn off the graphics window? I only want to output the results of the simulations in a text file.



Solution 1:[1]

I don't know of a way to do this with Python Turtle but NetLogo can be run headless. Since it can be run from the command line it could be launched from a Python script.

From the NetLogo documentation:

NetLogo is a programmable modeling environment for simulating natural and social phenomena. [...] Headless mode allows doing batch runs from the command line [...] Command line operation is also supported.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 FractalLotus