This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author excitoon
Recipients Malcolm Smith, ammar2, excitoon, izbyshev, paul.moore, python-dev, steve.dower, tim.golden, zach.ware
Date 2018-05-30.16:48:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1527698918.32.0.682650639539.issue29326@psf.upfronthosting.co.za>
In-reply-to
Content
Hi Steve.

I'll try to explain what is my motivation.

I need a reliable way to run Python (not matter embedded or not) in isolated mode, but still having current directory in `sys.path` (empty entry).

Ironically I could misuse normal mode to simulate isolated mode with specified %PYTHONPATH% (which is not much handy, by the way), but hiding Windows Registry keys would look pretty hard (it is impossible to make a bat/cmd wrapper). Possibility to search %PYTHONPATH% in HKLM entries makes it even worse.

Empty entry in `sys.path` is a extremely popular thing, and many software depend on it. It looks like a bug that isolated mode cannot support such entry.

# How would I fix it.

Possibly we should allow another keyword for adding an empty entry (like we have an exclusion for `import site`).

Ideas are appreciated.
History
Date User Action Args
2018-05-30 16:48:38excitoonsetrecipients: + excitoon, paul.moore, tim.golden, python-dev, zach.ware, steve.dower, Malcolm Smith, ammar2, izbyshev
2018-05-30 16:48:38excitoonsetmessageid: <1527698918.32.0.682650639539.issue29326@psf.upfronthosting.co.za>
2018-05-30 16:48:38excitoonlinkissue29326 messages
2018-05-30 16:48:38excitooncreate