Another horrid solution

> #!/usr/bin/python
> # line number does not change so we use that

# the data we're looking for does not have a (unique) close tag (htmllib
> ????)
>
> import re, urllib2
> file=urllib2.urlopen('http://10.1.2.201/server-status')
> n=0
> for line in file:
>  n=n+1
>  if n==16:
>   print re.sub('requests.*','',line)[4:].strip()
>  elif n==17:
>   print re.sub('requests.*','',line)[4:].strip()
>
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to