[Tutor] Early Coder problem

Alan Gauld alan.gauld at yahoo.co.uk
Sun Apr 12 10:23:13 EDT 2020


On 11/04/2020 23:55, Laffey, Ian wrote:

> First, I was wondering why I have so many Python related folders. 

No idea!
Python does install a lot of folders but they should all be
under one top-level one. (Actually in Unix-like OS that's
not strictly true, the executable sits separate from
the folders...)

You can have multiple pythons installed, in which case they
may all have their own "Home" folder structure.

But you will need to tell us more - give some examples
of where these folders are -before we can say much more.

> I think the easy answer is that I have unfortunately spread 
> it across three drives (2 SSD and 1 HDD)

Maybe but I don't know how you would have done that since
the installer just asks for a home location (if it asks
anything at all!).

Unless you are talking about your own project directories,
in which case that will have been your own choice (or maybe
your IDE if you use one)

>I wanted to clarify how I know where something Is pulling directories from when executing, 

You can put a debug statement in that asks python the filename of a
module(*). and you can examine the sys.path value which lists all the
places python looks for files.

(*)
print(somemodule.__file__)


-- 
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