Hello all
I am trying to learn Python, following some tutorials and books. I have a web-based 'book' called "How to think like a computer scientist" by Jeffrey Elkner et al. I wondered if someone might know where I have gone wrong with the following issues.....
I was doing just fine, until he introduced GASP (Graphics API for Students of Python) in Chapter 4. The sticking point was the first line of code he introduces:
from GASP import *
I got an error message saying "No module named GASP"
Now, I went in search of GASP, found it and downloaded it. But it continues to show this message. I also noted that there was an instruction to put it in library/python/2.5/site-packages - which I did. It still didn't run
I don't fully understand how the import command works here and imagined that it all has something to do with where the files are located. I feel completely mystified - as I have tried moving the GASP - 0.1.1 folder to other places too!
Just for completeness - I am working mainly with the Terminal rather than with IDLE. Also, when I type, for example
from Tkinter import *
it works ok.
Can anyone help me demystify this for me so I can continue learning some more!
Thanks in advance
I am trying to learn Python, following some tutorials and books. I have a web-based 'book' called "How to think like a computer scientist" by Jeffrey Elkner et al. I wondered if someone might know where I have gone wrong with the following issues.....
I was doing just fine, until he introduced GASP (Graphics API for Students of Python) in Chapter 4. The sticking point was the first line of code he introduces:
from GASP import *
I got an error message saying "No module named GASP"
Now, I went in search of GASP, found it and downloaded it. But it continues to show this message. I also noted that there was an instruction to put it in library/python/2.5/site-packages - which I did. It still didn't run
I don't fully understand how the import command works here and imagined that it all has something to do with where the files are located. I feel completely mystified - as I have tried moving the GASP - 0.1.1 folder to other places too!
Just for completeness - I am working mainly with the Terminal rather than with IDLE. Also, when I type, for example
from Tkinter import *
it works ok.
Can anyone help me demystify this for me so I can continue learning some more!
Thanks in advance