Incomplete sys.path with embeddable python (Windows)!?

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Apr 22 19:49:03 EDT 2023


On 23/04/23 10:04 am, Ralf M. wrote:
> I thought about that, but for that to work all local modules across all 
> script locations must have unique names, otherwise import might get hold 
> of a module from the wrong directory.

You could put all the local modules belonging to a particular
script into a package named after the script, e.g. put the local
modules used by foo.py into a package called foolib.

-- 
Greg


More information about the Python-list mailing list