Jump to content
  • Advertisement
Sign in to follow this  
revisioned

[python] modules messed up, gasp doesnt work?

This topic is 3799 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

when I go to help -> help() -> modules i get an error instead of it displaying the modules:
Traceback (most recent call last):
  File "<pyshell#29>", 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
also I'm doing a tutorial from a book http://openbookproject.net/thinkCSpy/ch08.xhtml -- thinkCSpy vol 2 and it's trying to use gasp with 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 problem is the black ball doesn't show up on the screen, it's supposed to move across the screen but it doesn't show up at all and clicking on the window just causes it to crash (i have vista) I think maybe the example was done in an older version of GASP because YELLOW isn't part of the module, I had to change it to lower-case letters to work.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by revisioned
when I go to help -> help() -> modules i get an error instead of it displaying the modules:


"Python" doesn't have a 'help -> help() -> modules'. What exactly are you running for this to happen?

It is saying that it lacks a TCL package, which in turn is being requested by PyOpenGL. So whatever you're running seems to require some stuff that you don't have installed.

Quote:
also I'm doing a tutorial from a book
http://openbookproject.net/thinkCSpy/ch08.xhtml
-- thinkCSpy vol 2 and it's trying to use gasp with this code:


I've never heard of that before, so I'm guessing it's not all that popular and you're unlikely to find much help on its specifics here. Better to look on their site, I think.

Share this post


Link to post
Share on other sites
the help thing is used in IDLE
you type help and it asks for some things then you can type help() for interactive help then typing 'modules' lists all the modules

@ the 2nd part
it's a simpler version of pygame from what I understand, it's based from it.
Thanks anyways though I'll try asking on their site

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!