Re: Regarding importing from a sub-directory
Alan Gauld via Tutor <[email protected]> Sat, 10 Feb 2024 09:19:20 +0000
| Newsgroups | gmane.comp.python.tutor |
|---|---|
| Message-ID | <[email protected]> |
On 10/02/2024 03:18, Phil wrote: > There's no need Alan, to post either of my previous messages to the > list. I have discovered the answer to the problem. It's IDLE that's the > problem. VS Code does not have a problem importing from a sub_directory. > Since I took you off moderation a while back I no longer see the messages so they all get posted, including this one! :-) However the IDE is not the answer to the problem since they are only used in development. What you need to check is that the import works when you run the code directly in Python, ie without any IDE. I suspect the real solution is for you to modify the PYTHONPATH or sys.path values to include ~/Python. -- 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 _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor