Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Echo call to VLC bash using subprocess.Popen on Linux
Post: RE: Echo call to VLC bash using subprocess.Popen o...

Ok I figured it out. It seems like the issues were more with the VLC command I was using than with python or the echo calls. Instead of connecting to a unix socked I followed this suggestion to use a ...
LuukS001 General Coding Help 17 9,752 Jan-07-2019, 03:58 AM
    Thread: Echo call to VLC bash using subprocess.Popen on Linux
Post: RE: Echo call to VLC bash using subprocess.Popen o...

I made it work partly but it seems like I am back to the beginning. I was able to use shlex.split to call a subprocess.popen without shell and I use shell=true for the echo calls. But again the echo c...
LuukS001 General Coding Help 17 9,752 Jan-06-2019, 02:57 PM
    Thread: Echo call to VLC bash using subprocess.Popen on Linux
Post: RE: Echo call to VLC bash using subprocess.Popen o...

Well, it only hangs both in python and terminal when the enqueue call is made with python. When I open vlc through subprocess, then enqueue in terminal, then do the echo play call in python it works...
LuukS001 General Coding Help 17 9,752 Jan-06-2019, 01:01 PM
    Thread: Echo call to VLC bash using subprocess.Popen on Linux
Post: RE: Echo call to VLC bash using subprocess.Popen o...

I can confirm this opens a VLC instance from Python, which I can control with the echo calls from the Terminal. Note that I added a 'break' line to the python script. import subprocess import socket...
LuukS001 General Coding Help 17 9,752 Jan-06-2019, 11:44 AM
    Thread: Echo call to VLC bash using subprocess.Popen on Linux
Post: RE: Echo call to VLC bash using subprocess.Popen o...

Hmm this also hangs... on most forums I see the issues I am having shouldn't be happening. And I had no problems making it work on my MacOSX, could it help to install another OS? Linux Mint for exampl...
LuukS001 General Coding Help 17 9,752 Jan-06-2019, 11:06 AM
    Thread: Echo call to VLC bash using subprocess.Popen on Linux
Post: RE: Echo call to VLC bash using subprocess.Popen o...

Thank you very much, that makes sense. I have been trying to implement it but without the shell=true flag I get this error: OSError: [Errno 2] No such file or directory When I split the command into:...
LuukS001 General Coding Help 17 9,752 Jan-06-2019, 09:56 AM
    Thread: Echo call to VLC bash using subprocess.Popen on Linux
Post: RE: Echo call to VLC bash using subprocess.Popen o...

Thank you, that looks great. If I understand it well, I can replace asock and osock with the vlc socket locations. And I can add the echo commands to the input in b.py so it will be send to both so...
LuukS001 General Coding Help 17 9,752 Jan-04-2019, 04:38 AM
    Thread: Echo call to VLC bash using subprocess.Popen on Linux
Post: RE: Echo call to VLC bash using subprocess.Popen o...

When I use communicate() the script hangs, just like when I use stdout.read()... This is the script: p = subprocess.Popen(['vlc -I oldrc --rc-unix=/home/user/Documents/Sockets/socket1.sock'], shell ...
LuukS001 General Coding Help 17 9,752 Jan-03-2019, 04:41 PM
    Thread: Echo call to VLC bash using subprocess.Popen on Linux
Post: RE: Echo call to VLC bash using subprocess.Popen o...

Thank you, I tried it but I get an "attribute error: 'module' object has no attribute 'run'. Should I call another library?
LuukS001 General Coding Help 17 9,752 Jan-03-2019, 04:10 PM
    Thread: Echo call to VLC bash using subprocess.Popen on Linux
Post: Echo call to VLC bash using subprocess.Popen on Li...

I am using this both on my macosx and linux and it works well. On linux the shell commands are slightly different: vlc -I oldrc --rc-unix=/home/user/Documents/Sockets/socket1.sock vlc -I oldrc --rc-u...
LuukS001 General Coding Help 17 9,752 Jan-03-2019, 04:29 AM

User Panel Messages

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