Path: csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Cecil Westerhof Newsgroups: comp.lang.python Subject: Re: Linux script to get most expensive processes Date: Wed, 05 Aug 2015 01:17:39 +0200 Organization: Decebal Computing Lines: 24 Message-ID: <87fv3yhcdo.fsf@Equus.decebal.nl> References: <87twsehkmk.fsf@Equus.decebal.nl> <87pp32hhbr.fsf@Equus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="528adfd6ad074c92fdc6a7f8fb9e23d8"; logging-data="4877"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/AwxiOp/PwPmwQoC44MjGuJM3iEiYsI+M=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Homepage: http://www.decebal.nl/ Cancel-Lock: sha1:wDL1/ksAzLAYo/+arawMvRK4zVs= sha1:3f6ZTozX/agyMGH74z0RC7YdVTg= Xref: csiph.com comp.lang.python:94981 On Wednesday 5 Aug 2015 00:12 CEST, Emile van Sebille wrote: > On 8/4/2015 2:30 PM, Cecil Westerhof wrote: >> On Tuesday 4 Aug 2015 22:52 CEST, Emile van Sebille wrote: > >>> My platform shows as linux2 and it worked fine for me when >>> checking for that. >> >> I heard that that was possible also, but none of my systems gives >> this. I should change it. > > You could also use the platform module: > > >>>> import platform >>>> platform.system() > 'Linux' I already use sys, so I think sys.platform is a little better. ;-) -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof