[Tutor] Problem with graphics.py
Alan Gauld
alan.gauld at yahoo.co.uk
Wed Aug 10 04:40:22 EDT 2016
On 09/08/16 17:55, Michael Selik wrote:
> Do you mind running the following commands from the python shell?
>
> py> import os
> py> os.getcwd()
> '/Users/mike'
> py> sorted(os.listdir('.'))
> ['.Trash', 'Applications', 'Desktop', ...]
>
> This will show us what location your python interpreter has as the "current
> working directory" and whether or not the "graphics.py" file is present in
> that directory.
That's true but only one of the locations that Python looks in.
You also need to use the command Steven suggested:
>>> import sys
>>> sys.path
to see all the places Python will look.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list