Skip to content

Commit db2ea8a

Browse files
committed
Add a note about importing before use (this is the point where many students will be re-opening an interactive Python shell.) Alternative solution to OpenTechSchool#36
1 parent 0df0d0f commit db2ea8a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/en/simple_drawing.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,15 @@ Python shell. If there is a lot of text, Python will put the help text
111111
into a *pager*, which lets you page up and down. Press the :kbd:`q`
112112
key to exit the pager.
113113

114-
Alternatively, browse the `online documentation`__.
114+
.. tip::
115+
116+
Are you seeing an error like this::
117+
118+
NameError: name 'turtle' is not defined``
119+
120+
when trying to view help? In Python you have to import names before you can refer to them, so in a new Python interactive shell you'll need to ``import turtle`` before ``help(turtle.color)`` will work.
121+
122+
Another way to find out about functions is to browse the `online documentation`__.
115123

116124
__ http://docs.python.org/library/turtle
117125

0 commit comments

Comments
 (0)