Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [popen]

popen() is a way to communicate with subprocesses using a file-like interface. It originated in C, but has been ported to other languages (via extensions) such as Python.

1 vote
1 answer
32 views

Popening a gnome-terminal in python immediately appears as a zombie

For background I am working on a script to train multiple pytorch models. I have a training script that I want to be able to run as a sub process in a gnome terminal. The main reason for this is so I ...
Sami Wood's user avatar
  • 445
0 votes
2 answers
57 views

Python: Submitting and tracking many subprocesses leads to "stuck" subprocesses

I have an 3rd party cli executable I need to call from my python code. These are heavy calculations (cpu) and there are around 50-100 times I need to call it. The executable itself is to some degree ...
beginner_'s user avatar
  • 7,520
0 votes
1 answer
32 views

Access host data when running a program from docker container

I'm trying to run the following in a C program hosted in a docker container; #include <stdio.h> #include <stdlib.h> int main( int argc, char *argv[] ) { FILE *fp; char path[1035]; ...
user2384330's user avatar
0 votes
1 answer
38 views

Cannot kill Popen process [duplicate]

I have a Python program with the following structure and necessary imports: def startLogger(logger_dir): command0 = 'adb logcat -c' command1 = 'adb logcat' command2 = 'python3 '+logger_dir+...
Priyansh Gupta's user avatar
0 votes
1 answer
55 views

Getting the result from a future in Python

I have the following code which executes a process and calls a callback function when the process is done import os import subprocess import tempfile def callback(future): print(future....
Peter Kronenberg's user avatar
0 votes
2 answers
61 views

C++: fgets issue in getting command terminal data

I am writing a C++ program for an embedded Linux application for a custom device. Very often, I run Linux terminal commands via popen and pclose. If I need to only check whether the command was ...
ysba's user avatar
  • 21
0 votes
1 answer
34 views

printing output of subprocess.Popen in a pyQt5 Widget (realtime)

I checked every post regarding this issue and I found either very old posts (2011) or posts with solutions not working or fitting. My "only" wish is to bring the output of Popen to a ...
Stefan Bongers's user avatar
0 votes
0 answers
20 views

Kill open Popen handles on Flask dev server restart

I have a Flask app that I'm using to serve a webapp, whose frontend is built using esbuild. I've managed to configure the Flask server to start the esbuild process in development mode, and to ensure ...
JMA's user avatar
  • 407
3 votes
1 answer
65 views

Can a Python program find orphan processes that it previously created?

I'm using popen() to create potentially long-running processes in Python. If the parent program dies and then restarts, is there a way to retrieve the previously created processes that are still ...
Peter Kronenberg's user avatar
0 votes
1 answer
52 views

Does popen().readline block until all output is read?

I'm running an asynchronous long-running process with popen. If I'm interested in getting all the data written to stdout, can I just do cmd = popen(...) for line in cmd.stdout.readline() ... do ...
Peter Kronenberg's user avatar
0 votes
1 answer
24 views

How to serialize subprocess.popen()

This is follow-on to Return output of subprocess.popen() in webserver. I have a long running process that is kicked off by a Webserver call (running Django). I'm using subprocess.popen() to spawn the ...
Peter Kronenberg's user avatar
0 votes
1 answer
25 views

Return output of subprocess.popen() in webserver

I have a Webserver in Python using Django. I want to be able to kick of a long-running asynchronous subprocess and then have the client poll with a GET or POST and receive stdout as well as other ...
Peter Kronenberg's user avatar
1 vote
0 answers
30 views

Finding pid for python script B execution on a terminal using popen from python script A

I have a python script "A" that uses subprocess.Popen to launch a gnome-terminal and then executes a different python script "B" in there. I am stuck with retrieving the pid for ...
blackbeard's user avatar
-1 votes
1 answer
54 views

Cmd command execution with Popen Python

I want to execute command below using Popen: call "E:/Ansys/ANSYS Inc/v222/ansys/bin/winx64/lsprepost48/lsdynamsvar.bat" && "E:/Ansys/ANSYS Inc/v222/ansys/bin/winx64/lsdyna_sp....
Talgos_n's user avatar
0 votes
0 answers
37 views

FFMPEG FDKAAC and Python

Been banging my head against the wall for days on this. I'm writing a python program to take a 48kHz WAV file, convert it to 44.1kHz and encode it to HE-AAC via FDKAAC. FDK cannot convert to sample ...
Eric Barker's user avatar

15 30 50 per page
1
2 3 4 5
164