stdout Questions
4
I just want to see the output from a few simple println(...) in my Kotlin mulitplatform commonTest code. My build.gradle.kts looks a little like:
import org.jetbrains.kotlin.gradle.plugin.mpp.Kotl...
Nichollenicholls asked 19/2, 2020 at 22:1
3
Solved
I have a little logger function that returns potentially two handlers to log to a RotatingFileHandler and sys.stdout simultaneously.
import os, logging, sys
from logging.handlers import RotatingFil...
4
Solved
How do redirect
stderr to logfile
stdout to object
Things I've looked at:
>> and 2>> only redirect to file .
-RedirectStandardOutput and -RedirectStandardError only redirect to f...
Downcomer asked 13/7, 2017 at 4:43
4
Solved
Many programs display progress bars by printing to stdout and then returning to beginning of line and printing again. This way they can achieve realtime progress bar appearence.
Unfortunately, in m...
Footworn asked 10/7, 2017 at 13:10
5
Solved
I am writing a python script which checks various conditions and runs a powershell script accordingly to help me automate migration from windows XP to windows 7. The powershell script gives its own...
Mai asked 21/2, 2014 at 20:50
4
Solved
The answers to this question were inspired by @codeGeass' comment to an answer to How to execute a command in a Jenkins 2.0 Pipeline job and then return the stdout:
Can we use them together ? catc...
Porfirioporgy asked 28/8, 2021 at 19:42
5
Solved
My problem is, that I want to be able to overwrite/clear previous printed line in python console. This question has been asked many times (Python - Remove and Replace Printed items for example), ho...
Stoughton asked 9/4, 2016 at 17:11
4
Solved
I just switched to monolog and wanted to log my message to the PHP console instead of a file. This might seem obvious for some people, but it took me a little while to figure out how to do that and...
2
I am having a problem... does anyone knows why this code hangs in the while loop. The loop doesn't seem to catch the last line of the stdout.
working_file = subprocess.Popen(["/pyRoot/iAmACras...
4
I wrote a small program on PlatformIO for an ESP32 with ESP-IDF framework.
Currently this is connected to my PC with USB cable.
I receive lots of data from a CAN-BUS and I print this data with pri...
Seraph asked 21/9, 2019 at 6:32
5
Solved
Given the following answer (first c++11 answer):
How do I execute a command and get the output of the command within C++ using POSIX?
Here is the implementation for your convenience:
#include <c...
6
Solved
I need to close stdout and stderr for one of my C program. How is it possible without exiting the program in execution?
12
Solved
4
Solved
In Python you can print on the same line using \r to move back to the start of the line.
This works well for progress bars or increasing precentage counters, eg: Python print on same line
However...
Sum asked 23/7, 2017 at 8:45
5
Solved
I'd like to both capture and display the output of a process that I invoke through Python's subprocess.
I thought I could just pass my file-like object as named parameter stdout and stderr
I can ...
Charette asked 2/12, 2010 at 13:37
2
Solved
How to get \n printed to stdout on Windows? This code works in Python 2, but not with Python 3:
# set sys.stdout to binary mode on Windows
import sys, os, msvcrt
msvcrt.setmode(sys.stdout.fileno()...
Filomena asked 23/1, 2016 at 7:43
6
Solved
I need to pipe some data to a program's stdin:
First 4 bytes are a 32-bit unsigned int representing the length of the data. These 4 bytes are exactly the same as C would store an unsigned int in m...
Wool asked 12/7, 2014 at 1:50
12
I have a logger that has a RotatingFileHandler.
I want to redirect all Stdout and Stderr to the logger.
How to do so?
Serin asked 17/10, 2013 at 11:40
4
The need:
Timeout after X seconds, and kill the process (and all the processes it opened) if timeout reached before the process ends gracefully.
Read ongoing output at runtime.
Work with processe...
Keitel asked 6/8, 2016 at 6:20
18
Is the output of a Bash command stored in any register? E.g. something similar to $? capturing the output instead of the exit status.
I could assign the output to a variable with:
output=$(comma...
8
Solved
Is it possible to redirect stdout from an external program to a variable and stderr from external programs to another variable in one run?
For example:
$global:ERRORS = @();
$global:PROGERR = @()...
Bolognese asked 14/6, 2014 at 16:44
2
I'm trying to use an external process which reads the STDIN, and writes to STDOUT.
I want to write the equivalent of this in Elixir, without using an external library or wrapper script:
$ echo foo ...
Luciferase asked 17/12, 2022 at 10:40
4
Running a php-fpm application in a Docker container based on CentOS7.
Since I am using Docker I have to write my log output from all processes to PID 1's output. This way the Docker engine can sna...
13
Solved
I am using an init script to run a simple process, which is started with:
start-stop-daemon --start --quiet --chuid $DAEMONUSER \
--make-pidfile --pidfile $PIDFILE --background \
--exec $DAEMON ...
Expressive asked 24/11, 2011 at 3:33
5
Solved
I need to do something like this post, but I need to create a subprocess that can be given input and give output many times. The accepted answer of that post has good code...
from subprocess impor...
Annunciate asked 19/2, 2015 at 20:13
1 Next >
© 2022 - 2025 — McMap. All rights reserved.