os.system question

Ruslan Spivak alienoid at is.lg.ua
Tue Jun 3 12:18:01 CEST 2003

Hello, python users!

I need to get result from 'ping' command(in manpage they are 0, 1, 2), 
but when i execute the following lines i i get strange results:

import os

res = os.system("ping -w 3")
print res

This gives 256 or another numbers, what am i doing wrong?

Your help is very, very appreciated.

Best regards,

More information about the Python-list mailing list