[Tutor] import pygame
Dave Angel
d at davea.name
Wed Mar 14 02:25:12 CET 2012
Three points of order, then a response, all at the proper place, after
the portion of your message I'm quoting.
On 03/13/2012 05:48 PM, Tamar Osher wrote:
>
> Dear Dave: Hi. Pygame is located in my computer at c:\Python32\Lib\site-packages\pygame. I am having difficulty importing and using pygame. Can someone help, please?
>>>> import sys>>> print (sys.path)['C:\\Python32\\Lib\\idlelib', 'C:\\windows\\system32\\python32.zip', 'C:\\Python32\\DLLs', 'C:\\Python32\\lib', 'C:\\Python32', 'C:\\Python32\\lib\\site-packages']>>> import pygameTraceback (most recent call last): File "<pyshell#2>", line 1, in<module> import pygameImportError: No module named pygame>>>
>
1) please don't top-post. In this forum, as in most mailing lists, your
response should go after the portion of whatever message you're quoting.
2) please use text mode email. By posting in an html format, you cause
the lines of the message to run together. No harm done in this case,
but it's a bad habit to get into.
3) please use reply-all, or use other means to make sure you include
tutor at python.org as a recipient. You sent this message to me only, and
I don't reply to private emails.
As for your error, you're apparently not running this from a cmd prompt,
but from pyshell. So you've introduced other variables into the
equation, and somebody else will have to help.
Put those lines in a text file, and run them as:
c:\ >> python3 myfile.py
and see what error you get then. At that point, you know what Python
will do. If your shell gives worse results, then you have to figure out
the shell.
--
DaveA
More information about the Tutor
mailing list