os.system

String interpolation failing inside os.system call

String interpolation failing inside os.system call Question: Editing to skip to the answer: The problem was that the string I was interpolating had a non-ascii character in it that was invisible to the naked eye. I’m trying to run this ImageMagick Command: convert -verbose -size 732×142 xc:transparent -fill black -stroke black -strokewidth 2 -draw "roundrectangle …

Total answers: 2

ssh-keygen empty output with subprocess.run and os.system in python3.10 on macOS Ventura 13.1

ssh-keygen empty output with subprocess.run and os.system in python3.10 on macOS Ventura 13.1 Question: I have been attempting to output a signed public key generated from ssh-keygen (CLI) using python and the ‘subprocess’ library. I’ve also tried the ‘os’ library with the same results. I’m really looking to understand why it isn’t doing what I …

Total answers: 1

os.startfile() don't open the file

os.startfile() don't open the file Question: I want to make a list of files .max from a directory that the user can choose and then open it when the 3ds Max is not running. The problem is that I am using os.starfile() to open the .max file and even tryied to use subprocess but none …

Total answers: 1

Python OS module stalls after new processes starts

Python OS module stalls after new processes starts Question: I am trying to write a Raspberry Pi Python-3 script that turns on an IR receiver using a call to os.system() with mode2 as the argument. When this line of code executes, the mode2 process starts and runs properly (I can see it working in the …

Total answers: 1

How can I store a link in a variable and open it using os.system()

How can I store a link in a variable and open it using os.system() Question: I want to make an app in Python to open links the user assigned to buttons. For that I have to assign links to variables and open them. I tried opening them with the webbrowser module, but they would open …

Total answers: 1

How do I use multiple variables and strings within an os.system() command?

How do I use multiple variables and strings within an os.system() command? Question: im trying to make a simple program that downloads a file. im having a problem with the command part. here is the code: import os #gather user input print("hello! welcome to the website dowloader! paste in the url(including the http part) and …

Total answers: 1

Run CMD command in python script in ANOTHER Shell

Run CMD command in python script in ANOTHER Shell Question: I am running a pogram "xxx" in the windows cmd shell. With a python script I want to check whether this specific process "xxx" is frozen or not. If so, it should reopen the process with os.system(r’xxx.bat’) but then the python script does no check …

Total answers: 2

I can't do multiple os.system() commands. What am I missing?

I can't do multiple os.system() commands. What am I missing? Question: def separateSegments(): sound_file = pydub.AudioSegment.from_wav("SSTV-Complete-Transmission.wav") sound_file_Value = np.array(sound_file.get_array_of_samples()) # milliseconds in the sound track # * 4.88 ranges = [(0,1805600),(1805600,3625800),(3625800,5494800),(5494800,7300400),(7300400,9106000)] #print(str(ranges)) for x, y in ranges: new_file=sound_file_Value[x : y] song = pydub.AudioSegment(new_file.tobytes(), frame_rate=sound_file.frame_rate,sample_width=sound_file.sample_width,channels=1) song.export("AMEA_Transmission_" + str(x) + "-" + str(y) +".wav", format="wav") def processSegments(): …

Total answers: 1