[Tutor] Newbie question

asdg asdg mishu_yim at yahoo.com
Tue Jul 1 17:40:07 CEST 2008


You need to add the folder containing this module to your PYTHONPATH.

To do this, go to you interpreter and type:
>>> import sys
>>> sys.path.append("C:\Python25\ExampleFolder") 
That path was just an example, insert your own path leading to the desired folder there.

Python imports it's modules from specific folders on your hard-drive.
These folders where Python looks in are contained in a list. sys.path is actually a the list containing those path names. Appending new path names to sys.path makes python look in those locations too when importing modules.

Hope this helped you understand.

-Mishu

--- On Tue, 7/1/08, Nkem Onyemachi <nicole4real4eva at yahoo.com> wrote:
From: Nkem Onyemachi <nicole4real4eva at yahoo.com>
Subject: [Tutor] Newbie question
To: tutor at python.org
Date: Tuesday, July 1, 2008, 1:19 PM

Hi,
I am studying "thinking like a computer scientist using Python".
chapter 4 importing turtleworld is kind of a hitch 4 me .I downloaded the
swampy module and when importing, the interpreter gives am error saying this
module does not exist what do i do? i saved the swampy folder in the Python
folder in drive C . Thanks
_____________________________
Sent from my phone using flurry - Get free mobile email and news at:
http://www.flurry.com



      
_______________________________________________
Tutor maillist  -  Tutor at python.org
http://mail.python.org/mailman/listinfo/tutor


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20080701/945deba9/attachment.htm>


More information about the Tutor mailing list