<br><div><span class="gmail_quote">On 1/12/08, <b class="gmail_sendername">Christian Heimes</b> <<a href="mailto:lists@cheimes.de">lists@cheimes.de</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Christian Heimes wrote:<br>> MA Lemburg has suggested a per user site-packages directory in the<br>> "pkgutil, pkg_resource and Python 3.0 name space packages" thread. I've<br>> written a short PEP about it for Python
2.6 and 3.0.<br><br>Addition:<br>An user has requested a new option to suppress the user site packages<br>directory:<br><br>-s : don't add user site directory to sys.path; also PYTHONNOUSERSITE</blockquote><div><br>
+0.5 Thanks for writing this up as a PEP.<br><br>My main suggestion was going to be the ability to turn it off as you already mentioned. However, please consider leaving it off by default to avoid problems for installed python scripts importing user supplied code. For shared hosting environments where this becomes really useful users can easily add the -s (or whatever flag is chosen) to their programs themselves. I don't know what that'd mean on windows where #! lines don't exist. Yet another file extension to imply the flag (yuck)? A .cmd wrapper script to run python with the flag (ugh)?
<br><br>For security reasons we also need it disabled when the getuid() != geteuid() to avoid user supplied code being executed as another user. Defaulting to disabled would mean that security could be left up to the end user to mess up. (many systems do not allow setuid #! scripts but this issue would still apply to things run under sudo)
<br><br>-gps<br><br></div></div>