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: 6

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
jfp



Joined: 12 Jul 2004
Posts: 636

PostPosted: Tue Aug 27, 2019 8:38 am    Post subject: Reply with quote

Hello,

Sorry, I don't see your message.

Module subprocess is not fully implemented on OpenVMS.

If there are some voluntaries to wxork on it they are welcome...

JF
Back to top
View user's profile Send private message Send e-mail Visit poster's website
voalp



Joined: 06 May 2019
Posts: 6

PostPosted: Fri Aug 30, 2019 2:11 pm    Post subject: Reply with quote

Hello jfp,

I did a workaround and impemented starting processes with your module vms.starlet ( crembx, getdviw, creprc ). The workaround fits my needs but it is simpler than the Popen class.

I tried to find the error in the subprocess module but I am far away from understanding whats going on.
So I think I can't be a volunteer in this case.

I hope Python 2.7 and the rdb support will be ported to the X64 processor.
If you need a volunteer for this tasks I would try ....
but I have to say that I still have much to learn ...

Thanks
Fritz
Back to top
View user's profile Send private message
jfp



Joined: 12 Jul 2004
Posts: 636

PostPosted: Fri Sep 06, 2019 8:30 am    Post subject: Reply with quote

Hello Fritz,

Yes the subprocess module is complex, and there are more than one version floating around....

Nice to see that you have solved your problem.

About Python on x64, I will probably take a look, but there is a lot of external libraries to be ported.

Regards,

JF
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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