Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #29559 > unrolled thread

Re: How to limit CPU usage in Python

Started byTerry Reedy <tjreedy@udel.edu>
First post2012-09-20 12:46 -0400
Last post2012-09-20 12:46 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: How to limit CPU usage in Python Terry Reedy <tjreedy@udel.edu> - 2012-09-20 12:46 -0400

#29559 — Re: How to limit CPU usage in Python

FromTerry Reedy <tjreedy@udel.edu>
Date2012-09-20 12:46 -0400
SubjectRe: How to limit CPU usage in Python
Message-ID<mailman.964.1348159611.27098.python-list@python.org>
On 9/20/2012 11:12 AM, Rolando CaƱer Roblejo wrote:
> Hi all,
>
> Is it possible for me to put a limit in the amount of processor usage (%
> CPU) that my current python script is using? Is there any module useful
> for this task? I saw Resource module but I think it is not the module I
> am looking for. Some people recommend to use nice and cpulimit unix
> tools, but those are external to python and I prefer a python solution.
> I am working with Linux (Ubuntu 10.04).

Call the external tools with subprocess.open.

-- 
Terry Jan Reedy

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web