Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'parameter': 0.05; 'python': 0.08; 'suggestion.': 0.09; '"%s': 0.16; 'docstrings': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'hint': 0.16; 'message-id:@tim.thechases.com': 0.16; 'received:70.251': 0.16; 'received:dsl.rcsntx.swbell.net': 0.16; 'received:rcsntx.swbell.net': 0.16; 'received:swbell.net': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.16; 'subject:list': 0.18; 'functions,': 0.18; 'cc:no real name:2**0': 0.20; "doesn't": 0.22; 'cc:2**0': 0.22; 'header:In-Reply-To:1': 0.22; 'gregory': 0.23; 'import': 0.28; 'print': 0.29; 'cc:addr:python.org': 0.30; 'at.': 0.30; 'disappointed': 0.30; 'ewing': 0.30; 'granted,': 0.30; 'thanks': 0.30; 'seem': 0.31; 'it.': 0.33; "i've": 0.34; 'header :User-Agent:1': 0.34; 'pretty': 0.35; 'skip:" 20': 0.35; 'corner': 0.37; 'using': 0.37; 'but': 0.37; 'should': 0.38; 'subject:: ': 0.39; 'subject:with': 0.39; 'back': 0.62; 'online': 0.71; 'probe': 0.91; 'obvious,': 0.93 Date: Wed, 31 Aug 2011 19:53:48 -0500 From: Tim Chase User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.20) Gecko/20110826 Icedove/3.1.12 MIME-Version: 1.0 To: Gregory Ewing Subject: Re: PC locks up with list operations References: <4e5e2a0c$0$29965$c3e8da3$5496439d@news.astraweb.com> <4e5e2d81$0$29991$c3e8da3$5496439d@news.astraweb.com> <9c7uihF6feU1@mid.individual.net> In-Reply-To: <9c7uihF6feU1@mid.individual.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - boston.accountservergroup.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tim.thechases.com X-Source: X-Source-Args: X-Source-Dir: Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1314838442 news.xs4all.nl 2529 [2001:888:2000:d::a6]:55821 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:12538 On 08/31/11 18:31, Gregory Ewing wrote: > The Python process should also be able to set its own > limits using resource.setrlimit(). A new corner of stdlib that I've never poked at. Thanks for the suggestion. Disappointed though that it doesn't seem to have docstrings on the functions, so I had to wade back out to the online docs to probe at it. Granted, after the fact, they were pretty obvious, but it would be nice if "help(resource.getrlimit)" gave me a hint as to what that one expected parameter should have been. -tim import resource as r token = "RLIMIT_" for item in dir(r): if item.startswith(token): print "%s:" % item[len(token):], print "%s hard/%s soft" % r.getrlimit(getattr(r, item))