
Hi python experts, I am teaching python turtle graphics now and in class, most students have been successful using it. However, several students today got the same error message complaining about "module does not exist". If they run the same code in the shell (I am using version 3.3), it works just fine. But the second they copy the code into the code editor window (file), it fails with that error. Then I thought maybe it is because the file is saved on the school network under the student's "My Documents" set up on the server side. So I copied the file to the desktop and test it from there but that failed too. I eventually copied the file to the python directory (c:\python33) and that worked. So I guess the location of the file decided to act out just for those few students... Other students using the same computers were fine. Is there a way to make this work CONSISTENTLY for all users from their own "My Documents" on the server? I would hate to make them all save on the C drive, for backup issues and security issues (they can see other people's files there)... I hope this is a simple fix!! Please let me know... Thank you, Karine Laidley Computer Science Teacher (6th and 7th grade) AMSA Charter School Marlborough, MA (508)597-2400 k.laidley@amsacs.org

Please elaborate on your environment. Is the shell the OS shell or the IDLE shell? What code editing environment, IDLE or what? What OS? Could different students retain different personal environments? On Thu, Apr 11, 2013 at 2:16 PM, Karine Laidley <K.Laidley@amsacs.org>wrote:
Hi python experts,****
** **
I am teaching python turtle graphics now and in class, most students have been successful using it. However, several students today got the same error message complaining about “module does not exist”. If they run the same code in the shell (I am using version 3.3), it works just fine. But the second they copy the code into the code editor window (file), it fails with that error. Then I thought maybe it is because the file is saved on the school network under the student’s “My Documents” set up on the server side.****
** **
So I copied the file to the desktop and test it from there but that failed too. *I eventually copied the file to the python directory (c:\python33) and that worked*.****
** **
So I guess the location of the file decided to act out just for those few students… Other students using the same computers were fine. Is there a way to make this work CONSISTENTLY for all users from their own “My Documents” on the server? I would hate to make them all save on the C drive, for backup issues and security issues (they can see other people’s files there)…****
** **
I hope this is a simple fix!! Please let me know…****
** **
Thank you,****
** **
Karine Laidley****
** **
Computer Science Teacher (6th and 7th grade)****
AMSA Charter School****
Marlborough, MA****
(508)597-2400****
k.laidley@amsacs.org****
** **
_______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
-- Dr. Andrew N. Harrington Computer Science Department Loyola University Chicago Lakeshore office in the Math Department: 104 Loyola Hall http://www.cs.luc.edu/~anh Phone: 312-915-7999 Fax: 312-915-7998 aharrin@luc.edu

It was IDLE shell and IDLE script window. The cases where kids used "turtle.py", I made them change that name and that worked. But there were a handful who didn't use a suspicious file name so these are my issue at the moment. Thanks everyone for your responses. I will get a chance to test out your suggestions this afternoon... Thank you, Karine Laidley Computer Science Teacher (6th and 7th grade) AMSA Charter School Marlborough, MA (508)597-2400 k.laidley@amsacs.org From: anharrington@gmail.com [mailto:anharrington@gmail.com] On Behalf Of Andrew Harrington Sent: Thursday, April 11, 2013 3:42 PM To: Karine Laidley Cc: edu-sig@python.org Subject: Re: [Edu-sig] import turtle ERROR Please elaborate on your environment. Is the shell the OS shell or the IDLE shell? What code editing environment, IDLE or what? What OS? Could different students retain different personal environments? On Thu, Apr 11, 2013 at 2:16 PM, Karine Laidley <K.Laidley@amsacs.org<mailto:K.Laidley@amsacs.org>> wrote: Hi python experts, I am teaching python turtle graphics now and in class, most students have been successful using it. However, several students today got the same error message complaining about "module does not exist". If they run the same code in the shell (I am using version 3.3), it works just fine. But the second they copy the code into the code editor window (file), it fails with that error. Then I thought maybe it is because the file is saved on the school network under the student's "My Documents" set up on the server side. So I copied the file to the desktop and test it from there but that failed too. I eventually copied the file to the python directory (c:\python33) and that worked. So I guess the location of the file decided to act out just for those few students... Other students using the same computers were fine. Is there a way to make this work CONSISTENTLY for all users from their own "My Documents" on the server? I would hate to make them all save on the C drive, for backup issues and security issues (they can see other people's files there)... I hope this is a simple fix!! Please let me know... Thank you, Karine Laidley Computer Science Teacher (6th and 7th grade) AMSA Charter School Marlborough, MA (508)597-2400<tel:%28508%29597-2400> k.laidley@amsacs.org<mailto:k.laidley@amsacs.org> _______________________________________________ Edu-sig mailing list Edu-sig@python.org<mailto:Edu-sig@python.org> http://mail.python.org/mailman/listinfo/edu-sig -- Dr. Andrew N. Harrington Computer Science Department Loyola University Chicago Lakeshore office in the Math Department: 104 Loyola Hall http://www.cs.luc.edu/~anh Phone: 312-915-7999 Fax: 312-915-7998 aharrin@luc.edu<mailto:aharrin@luc.edu>

** **
So I copied the file to the desktop and test it from there but that failed too. *I eventually copied the file to the python directory (c:\python33) and that worked*.****
Hi Karine -- This sounds like an issue with sys.path, a list of directories to search when import is used. Windows installations of Python would not normally have My Documents or Desktop in sys.path I don't think. However these may be added. You can also show your students how to:
import sys sys.path.append("c:\\...") # whatever path
That won't stick across sessions though. For that you could use .pth files in your \\site-packages, which latter will be on sys.path and is the usual place to save your own classroom work. Kirby
participants (3)
-
Andrew Harrington
-
Karine Laidley
-
kirby urner