[Tutor] Detect the folder of a file
Steven D'Aprano
steve at pearwood.info
Thu Apr 28 06:11:56 EDT 2016
On Thu, Apr 28, 2016 at 09:57:19AM +0100, Oscar Benjamin wrote:
> You can write some code to test if a particular path represents the
> base directory of a virtual environment but I expect it would probably
> be fragile. Without knowing why you want to do this I suggest that you
> might want to find a different general approach to your real problem.
You know, some day I must learn why people use virtual environments. Its
a total mystery to me. It makes a sort-of sense to me if you're talking
about old versions of Python before per-user site-packages were added,
but that's been available since version 2.6. So I don't get it.
--
Steve
More information about the Tutor
mailing list