Path: csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!bcyclone01.am1.xlned.com!bcyclone01.am1.xlned.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'subject:script': 0.09; 'python': 0.10; 'weird': 0.15; '...)': 0.16; 'anyway).': 0.16; 'from:addr:lac': 0.16; 'from:addr:openend.se': 0.16; 'from:name:laura creighton': 0.16; 'message-id:@fido.openend.se': 0.16; 'received:89.233': 0.16; 'received:89.233.217': 0.16; 'received:89.233.217.133': 0.16; 'received:fido': 0.16; 'received:fido.openend.se': 0.16; 'subject:most': 0.16; 'laura': 0.18; 'to:2**1': 0.21; 'header:In-Reply-To:1': 0.24; 'script': 0.25; 'linux': 0.26; 'to:no real name:2**1': 0.27; 'received:se': 0.29; 'skip:s 30': 0.31; 'embedded': 0.32; 'handle': 0.34; 'running': 0.34; '(and': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'things': 0.38; 'to:addr:python.org': 0.40; 'where': 0.40; 'some': 0.40; 'header :Message-Id:1': 0.61; 'received:89': 0.80; 'subject:get': 0.81; 'write:': 0.91 To: python-list@python.org, lac@openend.se From: Laura Creighton Subject: Re: Linux script to get most expensive processes In-Reply-To: Message from Emile van Sebille of "Tue, 04 Aug 2015 13:52:39 -0700." References: <87twsehkmk.fsf@Equus.decebal.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25190.1438833972.1@fido> Date: Thu, 06 Aug 2015 06:06:12 +0200 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (theraft.openend.se [89.233.217.130]); Thu, 06 Aug 2015 06:06:13 +0200 (CEST) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1438833978 news.xs4all.nl 2842 [2001:888:2000:d::a6]:56493 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 3103 X-Received-Body-CRC: 948995193 Xref: csiph.com comp.lang.python:95061 If you are running this script with Python 2 write: if sys.platform.startswith('linux'): to handle the case where you get linux or linux2 (and a few other weird things some embedded systems give you ...) Right now I think every linux system returns linux for Python 3, so it is less of an issue (now, anyway). Laura