Situation : I have a basler camera connected to a raspberry pi, and I am trying to livestream it’s feed with FFmpg to a tcp port in my windows PC in order to monitor whats happening in front of the camera. Things that work : I manage to set up a python script on the raspberry pi which is responsible
Tag: subprocess
Asyncio stream process data with pipe between two subprocesses
Hello I can’t find a solution for the example here. I found https://stackoverflow.com/a/36666420/6089311 but there is no stream reading. I’d like to run two subprocesses independent of python program (running in the background). The first subprocess feeds the second process through the pipe and I want to do some processing with the stdout lines by stream way. The example bellow
search by subproces in dir and return non-zero error
i want to make a program to search all my pc and make list of result , so first of all i can not search all partition together and have to use os.chdir(“”) on the other hand when some Suffix dose not exit in it make a error and stop program. My code: And result: What sould i do to
Pexpect inserts ‘/r/n’ into sendline()
I am using pexpect to automate running a C program in a zsh terminal on Ubuntu 20.04. The program in question is a spectrum convertor: http://www.np.ph.bham.ac.uk/research_resources/programs/spec_conv/spec_conv.c I have this installed and in my path. I can not run ‘spec_conv’ in my terminal and the program runs correctly. When the program starts there is an initial set of options (0-9). I
How to run python scripts in another directory, without writing scripts to disk?
Suppose I have two python scripts methods.py and driver.py. methods.py has all the methods defined in it, and driver.py does the required job when I run it. Let’s say I am in a main directory with the two files driver.py and methods.py, and I have n subdirectories in the main directory named subdir1,subdir2,…,subdirn. All of these subdirectories have files which
Unable to use subprocess in my colab python code
as part of a project I am doing wity Yolov4, I am trying to test multiple images with learned weights and copy the resulting images with added bounding boxes to my google drive. The following is the code I am running on colab. It just isn’t working, and there is no log messages to debug. Please not if I run
python: subprocess returns nothing when running scripts which take longer time
Beginner here with subrpocess problem: The below line works fine when I run both the scripts with less data which takes around 10-20minutes, however with bigger data to be processed the subprocess returns nothing once both the scripts are completed (lets say in an hour). Also: Often with lesser data, it behaves abnormally as well i.e. not returning the status_code/going
I am unable to check the files available in the directory
I am trying to read the csv files in the current directory. In-order to do that, I want to check all the files present in my current directory. I have tried doing it with check_output function. However, i received this error and I’m unable to figure out how to deal with it. This is the code I have tried: this
python3.7 subprocess failed to delete files for me
I have a python script using ‘subprocess’ running linux command to confirm my task is doing the right thing, and it worked well. But i found that at the same time it will generate some log files when running my task. So i added a clean up function to rm log files for me at the beginning. My script is:
FFMPEG concat leaves audio gapes between clips
I’m writing a python script that uses subprocess to invoke FFMPEG, not using pyffmpeg. My script generates a variable number of MP4 files using the AAC audio codec, and concatenates them together using FFMPEG. Here is how I’m constructing each clip: The command I’m using to concatenate them is: I then take that resulting video, and mix a looping audio