<div dir="ltr">Hi Steve,<br><div><div class="gmail_extra"><br><div class="gmail_quote">2017-10-19 1:59 GMT+02:00 Steven D'Aprano <span dir="ltr"><<a href="mailto:steve@pearwood.info" target="_blank">steve@pearwood.info</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On Wed, Oct 18, 2017 at 02:51:37PM +0200, Stefan Krah wrote:<br>
<br>
> $ softlimit -m 1000000000 python3<br>
</span>[...]<br>
<span class="gmail-">> MemoryError<br>
><br>
><br>
> People who are worried could make a python3 alias or use Ctrl-\.<br>
<br>
</span>I just tried that on two different Linux computers I have, and neither<br>
have softlimit.<br>
<br></blockquote><div><br></div><div>Yeah, not sure what "softlimit" is either.<br></div><div>I'd suggest sticking to POSIX-standard ulimit or just stick<br></div><div>something like this in the .pythonrc.py:<br><br>import resource<br>resource.setrlimit(resource.RLIMIT_DATA, (2 * 1024**3, 2 * 1024**3))<br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Nor (presumably) would this help Windows users.<br></blockquote><div><br></div><div>I (quickly) tried to get something to work using the win32 package,<br></div><div>in particular the win32job functions. <br>However, it seems setting<br></div><div>"ProcessMemoryLimit" using win32job.SetInformationJobObject<br></div><div>had no effect <br>(i.e.  a subsequent win32job.QueryInformationJobObject<br></div><div>still showed the limit as 0)?<br><br></div><div>People with stronger Windows-fu may be aware what is going on here...<br></div><div><br></div><div>Stephan <br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class="gmail-HOEnZb"><font color="#888888"><br>
<br>
--<br>
Steve<br>
</font></span><div class="gmail-HOEnZb"><div class="gmail-h5">______________________________<wbr>_________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/<wbr>codeofconduct/</a><br>
</div></div></blockquote></div><br></div></div></div>