Running External "Executable" Files - Wait/No Wait

Running External "Executable" Files - Wait/No Wait

isocam
Collaborator Collaborator
519 Views
1 Reply
Message 1 of 2

Running External "Executable" Files - Wait/No Wait

isocam
Collaborator
Collaborator

Can anybody help?

 

Does anybody know how to run an external executable (.exe) file, using a Python script, with two possible scenarios?

 

1]  Run the external file and "WAIT" until it is closed before continuing.

 

2]  Run the external file and "DO NOT WAIT" until it is closed before continuing.

 

(I am, at present, using subprocess.run)

 

Many thanks in advance!

 

Darren

0 Likes
520 Views
1 Reply
Reply (1)
Message 2 of 2

kandennti
Mentor
Mentor

Hi @isocam .

 

I am not sure if this is helpful.

 

I don't remember the details because I created it a long time ago, but I have used "subprocess.check_output" here.

https://github.com/kantoku-code/Fusion360_Curve3D_Doorway/blob/main/Curve3DDoorway/commands/Import3D... 

 

In the subprocess, we run the mRuby script, output the necessary information to the terminal, and receive it in python.

0 Likes