homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: subprocess.Popen with shell=True doesn't create socket
Type: behavior Stage: test needed
Components: Library (Lib) Versions: Python 3.4
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: asduj, eric.smith, martin.panter
Priority: normal Keywords:

Created on 2015年09月02日 21:57 by asduj, last changed 2022年04月11日 14:58 by admin. This issue is now closed.

Messages (5)
msg249576 - (view) Author: asduj (asduj) Date: 2015年09月02日 21:57
I want to run the next command
subprocess.Popen("soffice --accept='socket,host=localhost,port=8100;urp;'", shell=True)
to make soffice listen localhost:8100. It is work in python 2.7.9, but doesn't in python 3.4.3. I control it by
netstat -a | grep 8100
msg249579 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015年09月02日 22:32
Can you explain what is working in Python 2.7 that is not working in 3.4? Do you have an exception, error message, relevant netstat output, etc. What platform?
I don’t have Open Office on this computer, but I tried the following (Linux) command lines and both did what I expected:
"echo --accept='socket,host=localhost,port=8100;urp;'"
"sleep 3 && echo done"
msg249609 - (view) Author: asduj (asduj) Date: 2015年09月03日 06:51
After executing this code in Python 2.7 I check if OpenOffice is listening the localhost:8100, and get the output:
netstat -a | grep 8100
tcp 0 0 localhost:8100 *:* LISTEN
If I executing the same code in Python 3.4 and check, I get nothing.
Platform: Ubuntu 15.04. In fact, command runs any office installed on the computer (LibreOffice or OpenOffice), and on my computer I have LibreOffice.
There are no messages, the command runs normal, just not working as it should.
msg249635 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2015年09月03日 12:39
With both python 2 and 3, what does "ps -efww | fgrep soffice" produce?
msg249681 - (view) Author: asduj (asduj) Date: 2015年09月03日 19:01
Hello, Eric and Martin!
I don't know what happened, but now it works. I have checked this problem on two computers two days ago, and then the command was not working.
But now, I run exactly that command, and it works as should.
I don't know what has changed. Maybe, because I installed the OS update before I test again.
Thank you for attention and your time.
History
Date User Action Args
2022年04月11日 14:58:20adminsetgithub: 69175
2015年09月03日 21:03:48martin.pantersetresolution: works for me
2015年09月03日 19:01:47asdujsetstatus: open -> closed

messages: + msg249681
2015年09月03日 12:39:22eric.smithsetnosy: + eric.smith
messages: + msg249635
2015年09月03日 06:51:24asdujsetmessages: + msg249609
2015年09月02日 22:32:46martin.pantersetnosy: + martin.panter
messages: + msg249579

type: behavior
stage: test needed
2015年09月02日 21:57:44asdujcreate

AltStyle によって変換されたページ (->オリジナル) /