I am running Ubuntu.
If I type this into the terminal:
>>> import subprocess
>>> subprocess.Popen('firefox')
This is returned:
<subprocess.Popen object at 0xb76c080c>
>>> nvfx_screen_get_param:95 - Warning: unknown PIPE_CAP 30
nvfx_screen_get_param:95 - Warning: unknown PIPE_CAP 30
nvfx_screen_get_param:95 - Warning: unknown PIPE_CAP 55
nvfx_screen_get_param:95 - Warning: unknown PIPE_CAP 56
nvfx_screen_get_param:95 - Warning: unknown PIPE_CAP 59
nvfx_screen_get_param:95 - Warning: unknown PIPE_CAP 58
nvfx_screen_get_param:95 - Warning: unknown PIPE_CAP 30
It doesn’t return back to the python terminal: >>>
I am new to python on linux — can anyone show me what am I doing wrong? Thanks.
EDIT:
For anyone interested in fixing this, I solved the immediate issue this way:
from subprocess import PIPE,Popen
Popen('firefox',stdout=PIPE,stderr=PIPE)
Not the best way to open a browser. Maybe try this instead:
By the way, it has returned back to your python terminal, I can see that in the output. There has been some chatter on stdout or stderr from the process, which may have overwritten the
>>> prompt, but if you press Enter a few times you will probably find you’re still at the REPL.