Python Forum
run a command, capture output, what form do you want?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
run a command, capture output, what form do you want?
#1
when you run a command with the intent to get the output of that command, in what form would be most convenient for you?

1. what if the command is a network ping and you want each ping result as soon as the command outputs it? i already know i would not want to wait for the command to end and get all the output after that. well, in most cases, anyway.

2. what if the command is a text interactive command?

3. what if the command outputs one character at a time?

4. what if the output is binary with any byte code (0..255)?

would you want only whole lines, one line at a time?

would you want the whole output as one giant string?

do you ever need to send input to the command?

do you ever need to send it a Ctrl-C?
likes this post
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
run a command, capture output, what form do you want? - by Skaperen - Oct-27-2022, 07:04 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to capture output from license() in one Python process? Skaperen 0 982 Dec-08-2022, 03:35 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

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