'How to get module from another directory from terminal?

this is in Python, python 3.10.2 if we need specifics.

I’m using the Mac Terminal and I want to access a folder from it

I have a folder on my desktop that has a bunch of my modules. I wanna access these from the terminal in a style like: “import module” with using some command to get to that folder.

Help would be appreciated!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source