<br><div><span class="gmail_quote">On 1/12/08, <b class="gmail_sendername">Christian Heimes</b> &lt;<a href="mailto:lists@cheimes.de">lists@cheimes.de</a>&gt; 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>&gt; MA Lemburg has suggested a per user site-packages directory in the<br>&gt; &quot;pkgutil, pkg_resource and Python 3.0 name space packages&quot; thread. I&#39;ve<br>&gt; 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&nbsp;&nbsp;&nbsp;&nbsp; : don&#39;t add user site directory to sys.path; also PYTHONNOUSERSITE</blockquote><div><br>
+0.5&nbsp; 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.&nbsp; However, please consider leaving it off by default to avoid problems for installed python scripts importing user supplied code.&nbsp; For shared hosting environments where this becomes really useful users can easily add the -s (or whatever flag is chosen) to their programs themselves.&nbsp; I don&#39;t know what that&#39;d mean on windows where #! lines don&#39;t exist.&nbsp; Yet another file extension to imply the flag (yuck)?&nbsp; 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.&nbsp; Defaulting to disabled would mean that security could be left up to the end user to mess up.&nbsp; (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>