best way to ensure './' is at beginning of sys.path?

Ben Finney ben+python at benfinney.id.au
Sat Feb 4 02:02:33 EST 2017


Steve D'Aprano <steve+python at pearwood.info> writes:

> On Sat, 4 Feb 2017 10:13 am, Ben Finney wrote:
> > See <URL:https://www.python.org/dev/peps/pep-0328/>, in particular
> > <URL:https://www.python.org/dev/peps/pep-0328/#guido-s-decision>.
>
> I think you are conflating the package directory and . the current
> working directory.

I was careful not to say “current working directory”, for that reason.

I didn't want to open the more complex topic of Python packages, so I
let “current directory” stand in for “directory where the current module
is located”.

I'm glad that distinction did get mentioned, though.

-- 
 \     “Capitalism has destroyed our belief in any effective power but |
  `\      that of self interest backed by force.” —George Bernard Shaw |
_o__)                                                                  |
Ben Finney




More information about the Python-list mailing list