forum.vmspython.org Forum Index forum.vmspython.org
Forum system
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

subprocess.Popen stalls with stdout defined, python 2.7.12

 
Post new topic   Reply to topic    forum.vmspython.org Forum Index -> Python for OpenVMS
View previous topic :: View next topic  
Author Message
voalp



Joined: 06 May 2019
Posts: 4

PostPosted: Thu Jun 27, 2019 8:06 am    Post subject: subprocess.Popen stalls with stdout defined, python 2.7.12 Reply with quote

I tried to start processes with Popen:
The goal is to execute a command and put the output in the file op.out.

import subprocess
fo=open("op.out","w+")
a=subprocess.Popen("directory",stdout=fo)
fo.close()

Executing this python script it never finishes. It seems that the script is blocked at the subprocess.Popen command.

Using the script without stdout defined the directory command executes normally.

import subprocess
a=subprocess.Popen("directory")


Is this a bug ?
How can I avoid this problem ?
Any hints ?

Thanks
Fritz

Python 2.7.12 on VMS 8.4-2L1 ( Itanium )
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vmspython.org Forum Index -> Python for OpenVMS All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group