Regular Expression

Michael Fuhr mfuhr at fuhr.org
Wed Dec 15 09:04:17 CET 2004


Timothy Grant <timothy.grant at gmail.com> writes:

> On Tue, 14 Dec 2004 23:16:43 -0700, Michael McGarry
> <replytogroup at nospam.org> wrote:
> > 
> > ".... load average: 0.04, 0.02, 0.01"
> > 
> > how can I extract this number with RE or otherwise?
>
> Lot's of good solutions for the problem.

In the special case where you want the current load average numbers
for the box running the program and you have Python 2.3 or later,
you could use os.getloadavg().

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/



More information about the Python-list mailing list