I have 2 problems --

1. When I try having IDLE list the modules of python it gives me this error:

Traceback (most recent call last):
  File "<pyshell#7>", line 1, in <module>
    help()
  File "D:\Programs\Python\lib\site.py", line 346, in __call__
    return pydoc.help(*args, **kwds)
  File "D:\Programs\Python\lib\pydoc.py", line 1648, in __call__
    self.interact()
  File "D:\Programs\Python\lib\pydoc.py", line 1666, in interact
    self.help(request)
  File "D:\Programs\Python\lib\pydoc.py", line 1682, in help
    elif request == 'modules': self.listmodules()
  File "D:\Programs\Python\lib\pydoc.py", line 1803, in listmodules
    ModuleScanner().run(callback)
  File "D:\Programs\Python\lib\pydoc.py", line 1854, in run
    for importer, modname, ispkg in pkgutil.walk_packages():
  File "D:\Programs\Python\lib\pkgutil.py", line 125, in walk_packages
    for item in walk_packages(path, name+'.', onerror):
  File "D:\Programs\Python\lib\pkgutil.py", line 110, in walk_packages
    __import__(name)
  File "d:\programs\python\lib\site-packages\PyOpenGL-3.0.0b3-py2.5.egg\OpenGL\Tk\__init__.py", line 87, in <module>
    _default_root.tk.call('package', 'require', 'Togl')
TclError: can't find package Togl
>>>

It used to list the modules but since yesterday this has occured

2. I'm going through an e-book, http://openbookproject.net/thinkCSpy/ch08.xhtml , and it's asking to use GASP for a chapter
I have the module installed but I think the book uses an older version? It tells to use this code:

from gasp import *

begin_graphics(800, 600, title="Catch", background=color.YELLOW)
set_speed(120)

ball_x = 10
ball_y = 300
ball = Circle((ball_x, ball_y), 10, filled=True)
dx = 4
dy = 1

while ball_x < 810:
    ball_x += dx
    ball_y += dy
    move_to(ball, (ball_x, ball_y))
    update_when('next_tick')

end_graphics()

The first problem is that YELLOW isn't in the module I had to change it to lower-case which is what makes me think the versions are different.
Also a black ball is supposed to show up and move across the screen but it doesn't show up at all and when I click on the screen it freezes and says it's not responding

I've tried other snippets farther through the chapter that should have other things like buttons and controls and etc but still the only thing that comes up is a blank yellow screen and it freezes when I try to click it saying it's not responding.

Here is what you need to do:

1. Open the Python IDLE and type in:

>>> help()

(The following text will come up follow the instruction and you should find all the information you need)

Welcome to Python 2.5! This is the online help utility.

If this is your first time using Python, you should definitely check out
the tutorial on the Internet at http://www.python.org/doc/tut/.

Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules. To quit this help utility and
return to the interpreter, just type "quit".

To get a list of available modules, keywords, or topics, type "modules",
"keywords", or "topics". Each module also comes with a one-line summary
of what it does; to list the modules whose summaries contain a given word
such as "spam", type "modules spam".

2. To be honest I’ve never heard of a module called gasp so I suggest you read the e-book over because you might be missing something. Hope this helped and good luck.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.