Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we remove the need for .bat file to start Premiere? #8

Closed
BigRoy opened this issue Aug 4, 2020 · 1 comment
Closed

Can we remove the need for .bat file to start Premiere? #8

BigRoy opened this issue Aug 4, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@BigRoy
Copy link

BigRoy commented Aug 4, 2020

Issue

It seems the .bat file was introduced to not start Premiere Pro as the child process of the Python process. However, I believe that is also possible from subprocess directly.

# pseudocode
import subprocess

CREATE_NEW_CONSOLE = 0x00000010
subprocess.Popen(call, creationflags=CREATE_NEW_CONSOLE)

For example also used here. That code can start applications just fine without it keeping parent connections with the Python process.

Would this be applicable and usable for pymiere to start Premiere too?

@qmasingarbe
Copy link
Owner

I did some testing, if I execute the py in a simple console interpreter, Premiere seems to stay open when I kill the script or console. I only have the problem when running the script inside Pycharm, if I stop the script Premiere exits. Maybe Pycharm does some magic to kill processes on python stop?
Anyway I added your solution as the default and left the old .bat trick available as a function argument
@BigRoy thank you for telling me about those creationflags!

@qmasingarbe qmasingarbe added the enhancement New feature or request label Nov 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants