Python Forum
How to print the IP which shows destination host unreachable
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to print the IP which shows destination host unreachable
#2
You should use subrocess.check_output.

Note that this is also recommended in the docs for os.system:

Quote:subprocess module provides more powerful facilities for spawning new processes and retrieving their results; using that module is preferable to using this function. See the Replacing Older Functions with the subprocess Module section in the subprocess documentation for some helpful recipes.
Reply


Messages In This Thread
RE: How to print the IP which shows destination host unreachable - by buran - Jan-11-2017, 08:58 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020