Where Should Modules Go?

If I wanted to import my own modules, where should they go? Usually, you would put them in python’s “site-packages” folder.

I’m thinking ahead, like when a Panda App is turned into a run-time exe (installation create for game). Will the “site-packages” folder even exist then?

I want to create a module, but not sure about the best place to stick it for a Finished Panda App (although I don’t have anything finished. Lol).

Put it in a Python package, in the same directory your main Python script is in. That’s what 99.99% of the Python community does.

Then I guess I have to extend the Python path to include the sub Dir that’s holding my Module. (instead of the usual site-packages)

Got it.

Either add your package to the path or use only relative import.

For testing it should also be okay to simply start from the main directory where your package lies. The current working directory (cwd) is always added to the python path.