Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't access Turtle Demo
#1
I'm new to this forum and not sure if I've picked the right one.

I'm also new to Turtle graphics. and I'm trying to access the Demo scripts referenced in the Python Documentation Standard Library, 24.1.7.

I'm operating on a Mac, and I've tried to access the scripts on the terminal, but no luck.

Any suggestions will be appreciated.
Reply
#2
It would be helpful to know which version of Python you are using, what you are typing in the command terminal to invoke 'turtledemo' and what you get when you do.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#3
Thanks for the prompt response. I'm using Python 3.6.4.

Here's a screenshot of my terminal window. As you can see, I've tried several ways.

Last login: Sun Feb 4 11:45:12 on ttys000
Mac-mini:~ BillHatfield$ python3.6
Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import turtle
>>> python -m turtledemo
File "<stdin>", line 1
python -m turtledemo
^
SyntaxError: invalid syntax
>>> python -m turtledemo.py
File "<stdin>", line 1
python -m turtledemo.py
^
SyntaxError: invalid syntax
>>> python =m turtledemo.bytedesign
File "<stdin>", line 1
python =m turtledemo.bytedesign
^
SyntaxError: invalid syntax
>>> python =m turtledemo.bytedesign.py
File "<stdin>", line 1
python =m turtledemo.bytedesign.py
^
SyntaxError: invalid syntax
>>>
Reply
#4
Greetings everyone, I am having this exact same issue and hoping that a solution was found.

Can anyone assist?

I'm running on a Mac and my version is 3.7. See below for my obviously poor attempts at doing this. I am very new to coding so please aim solutions at dummy level.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 26 2018, 23:26:24)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "copyright", "credits" or "license()" for more information.
>>> python -m turtledemo
SyntaxError: invalid syntax
>>> python turtledemo.py
SyntaxError: invalid syntax
>>> python turtleDemo.py
SyntaxError: invalid syntax
>>> python -mturtleDemo
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
python -mturtleDemo
NameError: name 'python' is not defined
>>> python /user/CliMac/Documents/Python/TurtleDemo-Python3.x/turtleDemo.py
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
python /user/CliMac/Documents/Python/TurtleDemo-Python3.x/turtleDemo.py
NameError: name 'python' is not defined
>>> python /path/to/filename.py
Reply
#5
You need to type python -m turtledemo at the command line, not in the Python interpreter.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Adding Decimals to classes with OOP + rounding to significant digits (ATM demo) Drone4four 7 2,292 May-04-2022, 06:15 AM
Last Post: Drone4four
  demo not running for me - getting keyError wolf8963 4 3,433 Feb-13-2020, 03:54 PM
Last Post: wolf8963
  wn = turtle.screen() AttributeError: module 'turtle' has no attribute 'screen' Shadower 1 6,171 Feb-06-2019, 01:25 AM
Last Post: woooee
  Help! Turtle not working, even when we click the turtle demo in IDLE nothing happens. BertyBee 3 5,622 Jan-04-2019, 02:44 AM
Last Post: SheeppOSU
  Unable to Compile Demo dhollowe 0 3,051 Sep-05-2017, 11:36 PM
Last Post: dhollowe

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020